@vsn-ux/ngx-gaia 0.2.5 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/vsn-ux-ngx-gaia.mjs +234 -234
- package/fesm2022/vsn-ux-ngx-gaia.mjs.map +1 -1
- package/lib/form-field/field-label.component.d.ts +4 -1
- package/lib/form-field/form-control.di.d.ts +3 -1
- package/lib/input/input.directive.d.ts +4 -1
- package/lib/menu/menu-item.component.d.ts +5 -1
- package/lib/select/select.component.d.ts +1 -0
- package/lib/tooltip/tooltip.component.d.ts +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/setup-project.js +2 -38
- package/schematics/ng-add/setup-project.js.map +1 -1
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
import { GaFormFieldComponent } from './form-field.component';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class GaFieldLabelComponent {
|
|
4
5
|
private readonly document;
|
|
5
6
|
readonly formField: GaFormFieldComponent;
|
|
6
7
|
readonly for: import("@angular/core").InputSignal<string | undefined>;
|
|
8
|
+
readonly definition: import("@angular/core").InputSignal<string | TemplateRef<any> | null>;
|
|
9
|
+
readonly state: import("@angular/core").InputSignal<string | undefined>;
|
|
7
10
|
readonly controlId: import("@angular/core").Signal<string>;
|
|
8
11
|
readonly controlElement: import("@angular/core").Signal<HTMLElement | null>;
|
|
9
12
|
focusControl(): void;
|
|
10
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<GaFieldLabelComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GaFieldLabelComponent, "ga-label", never, { "for": { "alias": "for"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GaFieldLabelComponent, "ga-label", never, { "for": { "alias": "for"; "required": false; "isSignal": true; }; "definition": { "alias": "definition"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
12
15
|
}
|
|
@@ -2,10 +2,12 @@ import { InjectionToken, Signal } from '@angular/core';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export type GaFormControl = {
|
|
4
4
|
readonly _formControlId: Signal<string | null | undefined>;
|
|
5
|
+
readonly _formControlDisabled: Signal<boolean | null | undefined>;
|
|
5
6
|
};
|
|
6
7
|
export declare const GA_FORM_CONTROL: InjectionToken<GaFormControl>;
|
|
7
8
|
export declare class GaFormControlDirective implements GaFormControl {
|
|
8
9
|
readonly _formControlId: import("@angular/core").InputSignal<string | undefined>;
|
|
10
|
+
readonly _formControlDisabled: import("@angular/core").InputSignal<boolean | undefined>;
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<GaFormControlDirective, never>;
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GaFormControlDirective, "[gaFormControl]", never, { "_formControlId": { "alias": "gaFormControl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<GaFormControlDirective, "[gaFormControl]", never, { "_formControlId": { "alias": "gaFormControl"; "required": false; "isSignal": true; }; "_formControlDisabled": { "alias": "gaFormControlDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
13
|
}
|
|
@@ -11,11 +11,14 @@ export declare class GaInputDirective implements DoCheck, GaFormControl {
|
|
|
11
11
|
private readonly implicitErrors;
|
|
12
12
|
readonly invalidInput: import("@angular/core").InputSignalWithTransform<boolean | null, unknown>;
|
|
13
13
|
readonly idInput: import("@angular/core").InputSignal<string | undefined>;
|
|
14
|
+
readonly disabledInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
14
15
|
readonly invalid: import("@angular/core").Signal<boolean>;
|
|
15
16
|
readonly id: import("@angular/core").Signal<string>;
|
|
17
|
+
readonly disabled: import("@angular/core").WritableSignal<boolean>;
|
|
16
18
|
readonly errors: import("@angular/core").Signal<ValidationErrors | null>;
|
|
17
19
|
readonly _formControlId: import("@angular/core").Signal<string>;
|
|
20
|
+
readonly _formControlDisabled: import("@angular/core").Signal<boolean>;
|
|
18
21
|
ngDoCheck(): void;
|
|
19
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<GaInputDirective, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GaInputDirective, "[gaInput]", never, { "invalidInput": { "alias": "invalid"; "required": false; "isSignal": true; }; "idInput": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GaInputDirective, "[gaInput]", never, { "invalidInput": { "alias": "invalid"; "required": false; "isSignal": true; }; "idInput": { "alias": "id"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
21
24
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { GaIconData } from '../icon/';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
import * as i1 from "@angular/cdk/menu";
|
|
3
4
|
export declare class GaMenuItemComponent {
|
|
5
|
+
readonly icon: import("@angular/core").InputSignal<string | GaIconData | undefined>;
|
|
6
|
+
readonly description: import("@angular/core").InputSignal<string>;
|
|
7
|
+
readonly shortcut: import("@angular/core").InputSignal<string>;
|
|
4
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<GaMenuItemComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GaMenuItemComponent, "[gaMenuItem]", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.CdkMenuItem; inputs: {}; outputs: {}; }]>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GaMenuItemComponent, "[gaMenuItem]", never, { "icon": { "alias": "gaMenuItemIcon"; "required": false; "isSignal": true; }; "description": { "alias": "gaMenuItemDescription"; "required": false; "isSignal": true; }; "shortcut": { "alias": "gaMenuItemShortcut"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof i1.CdkMenuItem; inputs: {}; outputs: {}; }]>;
|
|
6
10
|
}
|
|
@@ -44,6 +44,7 @@ export declare class GaSelectComponent implements ControlValueAccessor, GaFormCo
|
|
|
44
44
|
readonly hasValue: import("@angular/core").Signal<boolean>;
|
|
45
45
|
readonly invalid: import("@angular/core").Signal<boolean>;
|
|
46
46
|
readonly _formControlId: import("@angular/core").Signal<string>;
|
|
47
|
+
readonly _formControlDisabled: import("@angular/core").Signal<boolean>;
|
|
47
48
|
constructor();
|
|
48
49
|
ngAfterContentInit(): void;
|
|
49
50
|
ngDoCheck(): void;
|
|
@@ -11,7 +11,7 @@ export declare class GaTooltipComponent {
|
|
|
11
11
|
readonly content: import("@angular/core").InputSignal<string | TemplateRef<any>>;
|
|
12
12
|
readonly template: import("@angular/core").Signal<TemplateRef<any> | null>;
|
|
13
13
|
readonly text: import("@angular/core").Signal<string | null>;
|
|
14
|
-
readonly position: import("@angular/core").InputSignal<"top-
|
|
14
|
+
readonly position: import("@angular/core").InputSignal<"top-start" | "top-end" | "top-center" | "bottom-start" | "bottom-end" | "bottom-center" | "left-start" | "left-end" | "left-center" | "right-start" | "right-end" | "right-center" | undefined>;
|
|
15
15
|
readonly offset: import("@angular/core").InputSignal<number>;
|
|
16
16
|
readonly hideTriggered: import("@angular/core").OutputEmitterRef<void>;
|
|
17
17
|
readonly triggerHide: () => void;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vsn-ux/ngx-gaia",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": "^19.0.0",
|
|
6
6
|
"@angular/common": "^19.0.0",
|
|
7
7
|
"@angular/core": "^19.0.0",
|
|
8
|
-
"@vsn-ux/gaia-styles": "^0.
|
|
8
|
+
"@vsn-ux/gaia-styles": "^0.3.0",
|
|
9
9
|
"lucide-angular": "^0.475.0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
@@ -15,48 +15,12 @@ const schematics_2 = require("@angular-devkit/schematics");
|
|
|
15
15
|
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
16
16
|
const path = require("path");
|
|
17
17
|
function ngAddSetupProject(options) {
|
|
18
|
-
return (0, schematics_2.chain)([
|
|
19
|
-
}
|
|
20
|
-
function updateAppModule(options) {
|
|
21
|
-
return (host, context) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const workspace = yield (0, workspace_1.getWorkspace)(host);
|
|
23
|
-
const project = (0, schematics_1.getProjectFromWorkspace)(workspace, options.project);
|
|
24
|
-
const mainFilePath = (0, schematics_1.getProjectMainFile)(project);
|
|
25
|
-
if ((0, schematics_1.isStandaloneApp)(host, mainFilePath)) {
|
|
26
|
-
// TODO: print warning message
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
addAnimationsToNonStandaloneApp(host, project, mainFilePath, context, options);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function addAnimationsToNonStandaloneApp(host, project, mainFile, context, options) {
|
|
33
|
-
const browserAnimationsModuleName = 'BrowserAnimationsModule';
|
|
34
|
-
const noopAnimationsModuleName = 'NoopAnimationsModule';
|
|
35
|
-
const appModulePath = (0, schematics_1.getAppModulePath)(host, mainFile);
|
|
36
|
-
if (options.animations) {
|
|
37
|
-
// In case the project explicitly uses the NoopAnimationsModule, we should print a warning
|
|
38
|
-
// message that makes the user aware of the fact that we won't automatically set up
|
|
39
|
-
// animations. If we would add the BrowserAnimationsModule while the NoopAnimationsModule
|
|
40
|
-
// is already configured, we would cause unexpected behavior and runtime exceptions.
|
|
41
|
-
if ((0, schematics_1.hasNgModuleImport)(host, appModulePath, noopAnimationsModuleName)) {
|
|
42
|
-
context.logger.error(`Could not set up "${browserAnimationsModuleName}" ` +
|
|
43
|
-
`because "${noopAnimationsModuleName}" is already imported.`);
|
|
44
|
-
context.logger.info(`Please manually set up browser animations.`);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
(0, schematics_1.addModuleImportToRootModule)(host, browserAnimationsModuleName, '@angular/platform-browser/animations', project);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
else if (!options.animations &&
|
|
51
|
-
!(0, schematics_1.hasNgModuleImport)(host, appModulePath, browserAnimationsModuleName)) {
|
|
52
|
-
// Do not add the NoopAnimationsModule module if the project already explicitly uses
|
|
53
|
-
// the BrowserAnimationsModule.
|
|
54
|
-
(0, schematics_1.addModuleImportToRootModule)(host, noopAnimationsModuleName, '@angular/platform-browser/animations', project);
|
|
55
|
-
}
|
|
18
|
+
return (0, schematics_2.chain)([addStyles(options)]);
|
|
56
19
|
}
|
|
57
20
|
const SUPPORTED_BOOTSTRAP_STYLE_IMPORTS = {
|
|
58
21
|
'.sass': `@use '@vsn-ux/ngx-gaia'\n`,
|
|
59
22
|
'.scss': `@use '@vsn-ux/ngx-gaia';\n`,
|
|
23
|
+
'.css': `@import '@vsn-ux/ngx-gaia';\n`,
|
|
60
24
|
};
|
|
61
25
|
function addStyles(options) {
|
|
62
26
|
return (host, context) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-project.js","sourceRoot":"","sources":["../../../../projects/ngx-gaia/schematics/ng-add/setup-project.ts"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"setup-project.js","sourceRoot":"","sources":["../../../../projects/ngx-gaia/schematics/ng-add/setup-project.ts"],"names":[],"mappings":";;;;;;;;;;;AAgBA,8CAEC;AAlBD,wDAGiC;AAEjC,2DAKoC;AACpC,qEAAqE;AACrE,6BAA6B;AAI7B,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,OAAO,IAAA,kBAAK,EAAC,CAAC,SAAS,CAAC,OAAO,CAAC,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