@ajf/material 18.4.1 → 18.5.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/README.md +167 -2
- package/audio/src/audio-module.d.ts +7 -6
- package/esm2022/audio/src/audio-module.mjs +22 -4
- package/esm2022/audio/src/audio.mjs +6 -6
- package/esm2022/barcode/barcode.mjs +3 -3
- package/esm2022/calendar/calendar.mjs +2 -2
- package/esm2022/checkbox-group/checkbox-group-item.mjs +3 -3
- package/esm2022/form-builder/form-builder-service.mjs +4 -2
- package/esm2022/form-builder/node-properties.mjs +3 -13
- package/esm2022/forms/boolean-field.mjs +6 -5
- package/esm2022/forms/current-slide.mjs +92 -0
- package/esm2022/forms/date-input-field.mjs +7 -9
- package/esm2022/forms/display-field.mjs +2 -2
- package/esm2022/forms/empty-field.mjs +3 -3
- package/esm2022/forms/field-row.mjs +117 -0
- package/esm2022/forms/field.mjs +2 -2
- package/esm2022/forms/form.mjs +107 -13
- package/esm2022/forms/forms-module.mjs +26 -3
- package/esm2022/forms/input-field.mjs +6 -8
- package/esm2022/forms/multiple-choice-field.mjs +45 -10
- package/esm2022/forms/public_api.mjs +6 -1
- package/esm2022/forms/range-field.mjs +5 -6
- package/esm2022/forms/rep-strip.mjs +61 -0
- package/esm2022/forms/single-choice-field.mjs +26 -11
- package/esm2022/forms/slide-header.mjs +68 -0
- package/esm2022/forms/slide-stats.mjs +148 -0
- package/esm2022/forms/table-field.mjs +2 -2
- package/esm2022/forms/text-field.mjs +2 -2
- package/esm2022/forms/video-url-field.mjs +6 -8
- package/esm2022/geolocation/geolocation.mjs +4 -6
- package/esm2022/page-slider/page-slider.mjs +3 -3
- package/esm2022/signature/signature.mjs +5 -6
- package/esm2022/time/time-module.mjs +22 -4
- package/esm2022/time/time.mjs +4 -4
- package/fesm2022/ajf-material-audio.mjs +27 -9
- package/fesm2022/ajf-material-audio.mjs.map +1 -1
- package/fesm2022/ajf-material-barcode.mjs +2 -2
- package/fesm2022/ajf-material-barcode.mjs.map +1 -1
- package/fesm2022/ajf-material-calendar.mjs +2 -2
- package/fesm2022/ajf-material-calendar.mjs.map +1 -1
- package/fesm2022/ajf-material-checkbox-group.mjs +2 -2
- package/fesm2022/ajf-material-checkbox-group.mjs.map +1 -1
- package/fesm2022/ajf-material-form-builder.mjs +5 -13
- package/fesm2022/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2022/ajf-material-forms.mjs +712 -99
- package/fesm2022/ajf-material-forms.mjs.map +1 -1
- package/fesm2022/ajf-material-geolocation.mjs +5 -7
- package/fesm2022/ajf-material-geolocation.mjs.map +1 -1
- package/fesm2022/ajf-material-page-slider.mjs +2 -2
- package/fesm2022/ajf-material-page-slider.mjs.map +1 -1
- package/fesm2022/ajf-material-signature.mjs +7 -8
- package/fesm2022/ajf-material-signature.mjs.map +1 -1
- package/fesm2022/ajf-material-time.mjs +24 -6
- package/fesm2022/ajf-material-time.mjs.map +1 -1
- package/forms/_theming.scss +142 -0
- package/forms/current-slide.d.ts +61 -0
- package/forms/field-row.d.ts +63 -0
- package/forms/form.d.ts +40 -3
- package/forms/forms-module.d.ts +57 -51
- package/forms/multiple-choice-field.d.ts +15 -1
- package/forms/public_api.d.ts +5 -0
- package/forms/rep-strip.d.ts +52 -0
- package/forms/single-choice-field.d.ts +7 -0
- package/forms/slide-header.d.ts +61 -0
- package/forms/slide-stats.d.ts +76 -0
- package/package.json +2 -2
- package/time/time-module.d.ts +4 -3
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (C) Gnucoop soc. coop.
|
|
4
|
+
*
|
|
5
|
+
* This file is part of the Advanced JSON forms (ajf).
|
|
6
|
+
*
|
|
7
|
+
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or
|
|
8
|
+
* modify it under the terms of the GNU Affero General Public License as
|
|
9
|
+
* published by the Free Software Foundation, either version 3 of the License,
|
|
10
|
+
* or (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
|
|
15
|
+
* General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
18
|
+
* along with Advanced JSON forms (ajf).
|
|
19
|
+
* If not, see http://www.gnu.org/licenses/.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
import { AjfBaseSlideInstance, AjfSlideInstance } from '@ajf/core/forms';
|
|
23
|
+
import { PipeTransform } from '@angular/core';
|
|
24
|
+
import { UntypedFormGroup } from '@angular/forms';
|
|
25
|
+
import * as i0 from "@angular/core";
|
|
26
|
+
/** The filled/total counter shown as a chip in the slide header. */
|
|
27
|
+
export interface AjfSlideCompletion {
|
|
28
|
+
done: number;
|
|
29
|
+
total: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* How many of a slide's fields carry a value, out of how many are on it. Notes
|
|
33
|
+
* (`AjfFieldType.Empty`) hold no value and are left out of both numbers.
|
|
34
|
+
*
|
|
35
|
+
* Impure because it reads mutable instance state, in the same way as
|
|
36
|
+
* `ajfValidSlide` and `ajfAsFieldInstanceErrors`. Returns a memoized object; see
|
|
37
|
+
* the note inside.
|
|
38
|
+
*/
|
|
39
|
+
export declare class AjfSlideCompletionPipe implements PipeTransform {
|
|
40
|
+
private _last;
|
|
41
|
+
transform(slide: AjfBaseSlideInstance, idx?: number, formGroup?: UntypedFormGroup | null): AjfSlideCompletion;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AjfSlideCompletionPipe, never>;
|
|
43
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AjfSlideCompletionPipe, "ajfSlideCompletion", false>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* How many of a slide's visible fields are failing validation.
|
|
47
|
+
*/
|
|
48
|
+
export declare class AjfSlideIssuesPipe implements PipeTransform {
|
|
49
|
+
transform(slide: AjfBaseSlideInstance, idx?: number): number;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AjfSlideIssuesPipe, never>;
|
|
51
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AjfSlideIssuesPipe, "ajfSlideIssues", false>;
|
|
52
|
+
}
|
|
53
|
+
/** What is left to fix in the whole form, for the header and footer alerts. */
|
|
54
|
+
export interface AjfFormIssues {
|
|
55
|
+
/** Visible fields failing validation, across every slide and repetition. */
|
|
56
|
+
fields: number;
|
|
57
|
+
/** How many slides hold at least one of them. */
|
|
58
|
+
slides: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The form's outstanding work in one place. A per-slide count only tells the
|
|
62
|
+
* reader about the slide they are already looking at, which is the one place
|
|
63
|
+
* they can see the failing fields for themselves.
|
|
64
|
+
*
|
|
65
|
+
* Counted here rather than taken from `AjfFormRendererService.errors`, which
|
|
66
|
+
* counts invalid slide pages and says nothing about how many fields are behind
|
|
67
|
+
* them.
|
|
68
|
+
*
|
|
69
|
+
* Impure and memoized, like its neighbours above.
|
|
70
|
+
*/
|
|
71
|
+
export declare class AjfFormIssuesPipe implements PipeTransform {
|
|
72
|
+
private _last;
|
|
73
|
+
transform(slides: AjfSlideInstance[] | null): AjfFormIssues;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AjfFormIssuesPipe, never>;
|
|
75
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AjfFormIssuesPipe, "ajfFormIssues", false>;
|
|
76
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ajf/material",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.5.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/gnucoop/ajf#readme",
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@ajf/core": "18.
|
|
16
|
+
"@ajf/core": "18.5.0",
|
|
17
17
|
"@angular/animations": "^18.2.13",
|
|
18
18
|
"@angular/cdk": "^18.2.14",
|
|
19
19
|
"@angular/common": "^18.2.13",
|
package/time/time-module.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import * as i1 from "./time";
|
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
4
|
import * as i3 from "@angular/forms";
|
|
5
5
|
import * as i4 from "@angular/material/form-field";
|
|
6
|
-
import * as i5 from "@angular/material/
|
|
7
|
-
import * as i6 from "@angular/material/
|
|
6
|
+
import * as i5 from "@angular/material/icon";
|
|
7
|
+
import * as i6 from "@angular/material/input";
|
|
8
|
+
import * as i7 from "@angular/material/select";
|
|
8
9
|
export declare class AjfTimeModule {
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AjfTimeModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AjfTimeModule, [typeof i1.AjfTime], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatFormFieldModule, typeof i5.
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AjfTimeModule, [typeof i1.AjfTime], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatFormFieldModule, typeof i5.MatIconModule, typeof i6.MatInputModule, typeof i7.MatSelectModule], [typeof i1.AjfTime]>;
|
|
11
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<AjfTimeModule>;
|
|
12
13
|
}
|