@ng-formworks/cssframework 17.2.7 → 18.0.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.
@@ -0,0 +1,69 @@
1
+ import { InjectionToken } from "@angular/core";
2
+ export declare const CSS_FRAMEWORK_CFG: InjectionToken<css_fw.frameworkcfg>;
3
+ export declare namespace css_fw {
4
+ type themeKV = {
5
+ name: string;
6
+ text: string;
7
+ };
8
+ class csscategories {
9
+ fieldHtmlClass?: string | string[];
10
+ labelHtmlClass?: string | string[];
11
+ htmlClass?: string | string[];
12
+ itemLabelHtmlClass?: string | string[];
13
+ activeClass?: string | string[];
14
+ }
15
+ type widgetstyles = {
16
+ '$ref'?: csscategories;
17
+ 'alt-date'?: csscategories;
18
+ 'alt-datetime'?: csscategories;
19
+ __themes__?: themeKV[];
20
+ __array_item_nonref__: csscategories;
21
+ __form_group__: csscategories;
22
+ __control_label__: csscategories;
23
+ __active__: csscategories;
24
+ __required_asterisk__: string;
25
+ __array__: csscategories;
26
+ '__remove_item__': string;
27
+ __help_block__: string;
28
+ __field_addon_left__: string;
29
+ __field_addon_right__: string;
30
+ __screen_reader__: string;
31
+ array: csscategories;
32
+ authfieldset?: csscategories;
33
+ advancedfieldset?: csscategories;
34
+ button?: csscategories;
35
+ checkbox?: csscategories;
36
+ checkboxes?: csscategories;
37
+ checkboxbuttons?: csscategories;
38
+ 'checkboxes-inline'?: csscategories;
39
+ date?: csscategories;
40
+ 'datetime-local'?: csscategories;
41
+ fieldset?: csscategories;
42
+ integer?: csscategories;
43
+ number?: csscategories;
44
+ optionfieldset?: csscategories;
45
+ password?: csscategories;
46
+ radiobuttons?: csscategories;
47
+ radio?: csscategories;
48
+ radios?: csscategories;
49
+ "radios-inline"?: csscategories;
50
+ 'range'?: csscategories;
51
+ section?: csscategories;
52
+ selectfieldset?: csscategories;
53
+ select?: csscategories;
54
+ submit?: csscategories;
55
+ text?: csscategories;
56
+ tabs?: csscategories;
57
+ tabarray?: csscategories;
58
+ textarea?: csscategories;
59
+ default: csscategories;
60
+ };
61
+ type frameworkcfg = {
62
+ name: string;
63
+ text: string;
64
+ stylesheets: string[];
65
+ scripts?: string[];
66
+ widgetstyles: widgetstyles;
67
+ widgets?: any;
68
+ };
69
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./css-framework.component";
3
+ import * as i2 from "@ng-formworks/core";
4
+ import * as i3 from "@angular/common";
5
+ export declare class CssFrameworkModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CssFrameworkModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CssFrameworkModule, [typeof i1.CssFrameworkComponent], [typeof i2.JsonSchemaFormModule, typeof i3.CommonModule, typeof i2.WidgetLibraryModule], [typeof i1.CssFrameworkComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<CssFrameworkModule>;
9
+ }
@@ -0,0 +1,12 @@
1
+ import { Observable, Subject } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CssframeworkService {
4
+ frameworkTheme$: Observable<string>;
5
+ activeRequestedTheme: string;
6
+ frameworkThemeSubject: Subject<string>;
7
+ constructor();
8
+ requestThemeChange(themeName: string): void;
9
+ getActiveRequestedTheme(): string;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<CssframeworkService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<CssframeworkService>;
12
+ }
@@ -0,0 +1,18 @@
1
+ import { Framework } from '@ng-formworks/core';
2
+ import { css_fw } from './css-framework.defs';
3
+ import { CssframeworkService } from './css-framework.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class CssFramework extends Framework {
6
+ cssFWService: CssframeworkService;
7
+ name: string;
8
+ framework: any;
9
+ config: css_fw.frameworkcfg;
10
+ constructor(cfg: css_fw.frameworkcfg, cssFWService: CssframeworkService);
11
+ getActiveTheme(): css_fw.themeKV;
12
+ requestThemeChange(name: string): void;
13
+ registerTheme(newTheme: css_fw.themeKV, overwrite?: boolean): boolean;
14
+ unregisterTheme(name: string): boolean;
15
+ getConfig(): css_fw.frameworkcfg;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<CssFramework, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<CssFramework>;
18
+ }
package/package.json CHANGED
@@ -1,51 +1,63 @@
1
- {
2
- "name": "@ng-formworks/cssframework",
3
- "version": "17.2.7",
4
- "description": "Angular ng-formworks - JSON Schema Form builder cssframework",
5
- "author": "https://github.com/zahmo/ng-formworks/graphs/contributors",
6
- "keywords": [
7
- "Angular",
8
- "ng",
9
- "Angular15",
10
- "Angular 15",
11
- "Angular16",
12
- "Angular 16",
13
- "Angular17",
14
- "Angular 17",
15
- "ng15",
16
- "ng16",
17
- "ng17",
18
- "JSON Schema",
19
- "form",
20
- "forms",
21
- "form builder",
22
- "form themes",
23
- "form generator",
24
- "ajsf",
25
- "ng-formworks",
26
- "ng formworks",
27
- "formworks",
28
- "angular json schema form"
29
- ],
30
- "license": "MIT",
31
- "repository": {
32
- "type": "git",
33
- "url": "git+https://github.com/zahmo/ng-formworks"
34
- },
35
- "bugs": {
36
- "url": "https://github.com/zahmo/ng-formworks/issues"
37
- },
38
- "private": false,
39
- "peerDependencies": {
40
- "@angular/common": "^17.0.0",
41
- "@angular/core": "^17.0.0"
42
- },
43
- "dependencies": {
44
- "tslib": "^2.3.0",
45
- "@ng-formworks/core": "~17.2.7"
46
- },
47
- "devDependencies": {
48
- "@types/lodash-es": "^4.17.6"
49
- },
50
- "sideEffects": false
1
+ {
2
+ "name": "@ng-formworks/cssframework",
3
+ "version": "18.0.0",
4
+ "description": "Angular ng-formworks - JSON Schema Form builder cssframework",
5
+ "author": "https://github.com/zahmo/ng-formworks/graphs/contributors",
6
+ "keywords": [
7
+ "Angular",
8
+ "ng",
9
+ "Angular15",
10
+ "Angular 15",
11
+ "Angular16",
12
+ "Angular 16",
13
+ "Angular17",
14
+ "Angular 17",
15
+ "Angular 18",
16
+ "ng15",
17
+ "ng16",
18
+ "ng17",
19
+ "ng18",
20
+ "JSON Schema",
21
+ "form",
22
+ "forms",
23
+ "form builder",
24
+ "form themes",
25
+ "form generator",
26
+ "ajsf",
27
+ "ng-formworks",
28
+ "ng formworks",
29
+ "formworks",
30
+ "angular json schema form"
31
+ ],
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/zahmo/ng-formworks"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/zahmo/ng-formworks/issues"
39
+ },
40
+ "private": false,
41
+ "peerDependencies": {
42
+ "@angular/common": "^18.0.0",
43
+ "@angular/core": "^18.0.0"
44
+ },
45
+ "dependencies": {
46
+ "tslib": "^2.7.0",
47
+ "@ng-formworks/core": "~18.0.0"
48
+ },
49
+ "sideEffects": false,
50
+ "module": "fesm2022/ng-formworks-cssframework.mjs",
51
+ "typings": "index.d.ts",
52
+ "exports": {
53
+ "./package.json": {
54
+ "default": "./package.json"
55
+ },
56
+ ".": {
57
+ "types": "./index.d.ts",
58
+ "esm2022": "./esm2022/ng-formworks-cssframework.mjs",
59
+ "esm": "./esm2022/ng-formworks-cssframework.mjs",
60
+ "default": "./fesm2022/ng-formworks-cssframework.mjs"
61
+ }
62
+ }
51
63
  }
@@ -1,10 +1,5 @@
1
- /*
2
- * Public API Surface of ng-formworks-cssframework
3
- */
4
-
5
- export * from './lib/css-framework.component';
6
- export * from './lib/css-framework.defs';
7
- export * from './lib/css-framework.module';
8
- export * from './lib/css-framework.service';
9
- export * from './lib/css.framework';
10
-
1
+ export * from './lib/css-framework.component';
2
+ export * from './lib/css-framework.defs';
3
+ export * from './lib/css-framework.module';
4
+ export * from './lib/css-framework.service';
5
+ export * from './lib/css.framework';
package/ng-package.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/@ng-formworks/cssframework",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- },
7
- "assets": ["./assets"],
8
- "allowedNonPeerDependencies": [
9
- "lodash-es",
10
- "@ng-formworks/core"
11
- ]
12
- }
@@ -1,67 +0,0 @@
1
- <div [attr.data-bs-theme]="theme" [attr.data-theme]="theme" [class]="options?.htmlClass || ''" [class.has-feedback]="options?.feedback && options?.isInputWidget &&
2
- (formControl?.dirty || options?.feedbackOnRender)" [class.has-error]="options?.enableErrorState && formControl?.errors &&
3
- (formControl?.dirty || options?.feedbackOnRender)" [class.has-success]="options?.enableSuccessState && !formControl?.errors &&
4
- (formControl?.dirty || options?.feedbackOnRender)">
5
-
6
- <button *ngIf="showRemoveButton" [class]="widgetStyles.__remove_item__" type="button" (click)="removeItem()">
7
- <span aria-hidden="true">&times;</span>
8
- <span [class]="widgetStyles.__screen_reader__">Close</span>
9
- </button>
10
- <div *ngIf="options?.messageLocation === 'top'">
11
- <p *ngIf="options?.helpBlock" [class]="widgetStyles.__help_block__" [innerHTML]="options?.helpBlock"></p>
12
- </div>
13
-
14
- <label *ngIf="options?.title && layoutNode?.type !== 'tab'" [attr.for]="'control' + layoutNode?._id" [class]="options?.labelHtmlClass || ''" [class.sr-only]="options?.notitle" [innerHTML]="options?.title"></label>
15
- <p *ngIf="layoutNode?.type === 'submit' && jsf?.formOptions?.fieldsRequired">
16
- <strong [class]="widgetStyles.__required_asterisk__">*</strong> = required fields
17
- </p>
18
- <div [class.input-group]="options?.fieldAddonLeft || options?.fieldAddonRight">
19
- <span *ngIf="options?.fieldAddonLeft" [class]="widgetStyles.__field_addon_left__" [innerHTML]="options?.fieldAddonLeft"></span>
20
-
21
- <select-widget-widget [layoutNode]="widgetLayoutNode" [dataIndex]="dataIndex" [layoutIndex]="layoutIndex"></select-widget-widget>
22
-
23
- <span *ngIf="options?.fieldAddonRight" [class]="widgetStyles.__field_addon_right__" [innerHTML]="options?.fieldAddonRight"></span>
24
- </div>
25
-
26
- <span *ngIf="options?.feedback && options?.isInputWidget &&
27
- !options?.fieldAddonRight && !layoutNode.arrayItem &&
28
- (formControl?.dirty || options?.feedbackOnRender)" [class.glyphicon-ok]="options?.enableSuccessState && !formControl?.errors" [class.glyphicon-remove]="options?.enableErrorState && formControl?.errors" aria-hidden="true" class="form-control-feedback glyphicon"></span>
29
- <div *ngIf="options?.messageLocation !== 'top'">
30
- <p *ngIf="options?.helpBlock" [class]="widgetStyles.__help_block__" [innerHTML]="options?.helpBlock"></p>
31
- </div>
32
-
33
- </div>
34
-
35
- <div *ngIf="debug && debugOutput">debug:
36
- <pre>{{debugOutput}}</pre>
37
- </div>
38
-
39
- <!--
40
- <div class="btn input input-bordered input-primary w-full max-w-xs
41
- btn-neutral
42
- btn-primary
43
- btn-secondary
44
- btn-accent
45
- btn-info
46
- btn-success
47
- btn-warning
48
- btn-error
49
- btn-ghost
50
- btn-link
51
- btn-outline
52
- btn-active
53
- btn-disabled
54
- glass
55
- no-animation
56
- btn-lg
57
- btn-md
58
- btn-sm
59
- btn-xs
60
- btn-wide
61
- btn-block
62
- btn-circle
63
- btn-square
64
- hidden
65
- ">defs al</div>
66
- -->
67
- <!--<input type="text" placeholder="Type here" class="input input-bordered input-primary w-full max-w-xs" />-->
@@ -1,45 +0,0 @@
1
- :host ::ng-deep {
2
- .list-group-item .form-control-feedback {
3
- top: 40px;
4
- }
5
- .checkbox,
6
- .radio {
7
- margin-top: 0;
8
- margin-bottom: 0;
9
- }
10
- .checkbox-inline,
11
- .checkbox-inline+.checkbox-inline,
12
- .checkbox-inline+.radio-inline,
13
- .radio-inline,
14
- .radio-inline+.radio-inline,
15
- .radio-inline+.checkbox-inline {
16
- margin-left: 0;
17
- margin-right: 10px;
18
- }
19
- .checkbox-inline:last-child,
20
- .radio-inline:last-child {
21
- margin-right: 0;
22
- }
23
- .ng-invalid.ng-touched {
24
- border: 1px solid #f44336;
25
- }
26
- }
27
-
28
- .checkbox-inline,
29
- .checkbox-inline+.checkbox-inline,
30
- .checkbox-inline+.radio-inline,
31
- .radio-inline,
32
- .radio-inline+.radio-inline,
33
- .radio-inline+.checkbox-inline {
34
- margin-left: 0;
35
- margin-right: 10px;
36
- }
37
-
38
- .checkbox-inline:last-child,
39
- .radio-inline:last-child {
40
- margin-right: 0;
41
- }
42
-
43
- .ng-invalid.ng-touched {
44
- border: 1px solid #f44336;
45
- }
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { CssFrameworkComponent } from './css-framework.component';
4
-
5
- describe('CssFrameworkComponent', () => {
6
- let component: CssFrameworkComponent;
7
- let fixture: ComponentFixture<CssFrameworkComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [CssFrameworkComponent]
12
- });
13
- fixture = TestBed.createComponent(CssFrameworkComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });