@ajf/material 15.2.1 → 15.2.3
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/barcode/barcode-module.d.ts +6 -4
- package/barcode/barcode.d.ts +8 -2
- package/esm2020/barcode/barcode-module.mjs +9 -1
- package/esm2020/barcode/barcode.mjs +30 -5
- package/esm2020/forms/field-service.mjs +7 -2
- package/esm2020/forms/form.mjs +3 -3
- package/esm2020/forms/forms-module.mjs +8 -1
- package/esm2020/forms/geolocation-field.mjs +44 -0
- package/esm2020/geolocation/ajf-material-geolocation.mjs +5 -0
- package/esm2020/geolocation/geolocation-module.mjs +61 -0
- package/esm2020/geolocation/geolocation.mjs +50 -0
- package/esm2020/geolocation/public_api.mjs +24 -0
- package/esm2020/time/time.mjs +2 -2
- package/fesm2015/ajf-material-barcode.mjs +37 -5
- package/fesm2015/ajf-material-barcode.mjs.map +1 -1
- package/fesm2015/ajf-material-forms.mjs +77 -28
- package/fesm2015/ajf-material-forms.mjs.map +1 -1
- package/fesm2015/ajf-material-geolocation.mjs +136 -0
- package/fesm2015/ajf-material-geolocation.mjs.map +1 -0
- package/fesm2015/ajf-material-time.mjs +2 -2
- package/fesm2020/ajf-material-barcode.mjs +37 -5
- package/fesm2020/ajf-material-barcode.mjs.map +1 -1
- package/fesm2020/ajf-material-forms.mjs +75 -28
- package/fesm2020/ajf-material-forms.mjs.map +1 -1
- package/fesm2020/ajf-material-geolocation.mjs +136 -0
- package/fesm2020/ajf-material-geolocation.mjs.map +1 -0
- package/fesm2020/ajf-material-time.mjs +2 -2
- package/forms/forms-module.d.ts +37 -35
- package/forms/geolocation-field.d.ts +30 -0
- package/geolocation/geolocation-module.d.ts +13 -0
- package/geolocation/geolocation.d.ts +33 -0
- package/geolocation/index.d.ts +5 -0
- package/geolocation/public_api.d.ts +23 -0
- package/package.json +10 -2
|
@@ -0,0 +1,44 @@
|
|
|
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 { AJF_WARNING_ALERT_SERVICE, AjfBaseFieldComponent, } from '@ajf/core/forms';
|
|
23
|
+
import { ChangeDetectionStrategy, Component, Inject, ViewEncapsulation, } from '@angular/core';
|
|
24
|
+
import * as i0 from "@angular/core";
|
|
25
|
+
import * as i1 from "@ajf/core/forms";
|
|
26
|
+
import * as i2 from "@ajf/material/geolocation";
|
|
27
|
+
import * as i3 from "@angular/common";
|
|
28
|
+
import * as i4 from "@angular/forms";
|
|
29
|
+
import * as i5 from "./warning-alert-service";
|
|
30
|
+
export class AjfGeolocationFieldComponent extends AjfBaseFieldComponent {
|
|
31
|
+
constructor(cdr, service, was) {
|
|
32
|
+
super(cdr, service, was);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
AjfGeolocationFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfGeolocationFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.AjfFormRendererService }, { token: AJF_WARNING_ALERT_SERVICE }], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
+
AjfGeolocationFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfGeolocationFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ajf-geolocation *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\"></ajf-geolocation>", styles: [""], dependencies: [{ kind: "component", type: i2.AjfGeolocationComponent, selector: "ajf-geolocation" }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfGeolocationFieldComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ajf-geolocation *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\"></ajf-geolocation>" }]
|
|
40
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AjfFormRendererService }, { type: i5.AjfWarningAlertService, decorators: [{
|
|
41
|
+
type: Inject,
|
|
42
|
+
args: [AJF_WARNING_ALERT_SERVICE]
|
|
43
|
+
}] }]; } });
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24tZmllbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8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1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public_api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWpmLW1hdGVyaWFsLWdlb2xvY2F0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWF0ZXJpYWwvZ2VvbG9jYXRpb24vc3JjL2FqZi1tYXRlcmlhbC1nZW9sb2NhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuIl19
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { AjfTranslocoModule } from '@ajf/core/transloco';
|
|
23
|
+
import { CommonModule } from '@angular/common';
|
|
24
|
+
import { NgModule } from '@angular/core';
|
|
25
|
+
import { FormsModule } from '@angular/forms';
|
|
26
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
27
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
28
|
+
import { MatInputModule } from '@angular/material/input';
|
|
29
|
+
import { AjfGeolocationComponent } from './geolocation';
|
|
30
|
+
import * as i0 from "@angular/core";
|
|
31
|
+
export class AjfGeolocationModule {
|
|
32
|
+
}
|
|
33
|
+
AjfGeolocationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfGeolocationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
34
|
+
AjfGeolocationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AjfGeolocationModule, declarations: [AjfGeolocationComponent], imports: [AjfTranslocoModule,
|
|
35
|
+
CommonModule,
|
|
36
|
+
FormsModule,
|
|
37
|
+
MatIconModule,
|
|
38
|
+
MatInputModule,
|
|
39
|
+
MatFormFieldModule], exports: [AjfGeolocationComponent] });
|
|
40
|
+
AjfGeolocationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfGeolocationModule, imports: [AjfTranslocoModule,
|
|
41
|
+
CommonModule,
|
|
42
|
+
FormsModule,
|
|
43
|
+
MatIconModule,
|
|
44
|
+
MatInputModule,
|
|
45
|
+
MatFormFieldModule] });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfGeolocationModule, decorators: [{
|
|
47
|
+
type: NgModule,
|
|
48
|
+
args: [{
|
|
49
|
+
imports: [
|
|
50
|
+
AjfTranslocoModule,
|
|
51
|
+
CommonModule,
|
|
52
|
+
FormsModule,
|
|
53
|
+
MatIconModule,
|
|
54
|
+
MatInputModule,
|
|
55
|
+
MatFormFieldModule,
|
|
56
|
+
],
|
|
57
|
+
declarations: [AjfGeolocationComponent],
|
|
58
|
+
exports: [AjfGeolocationComponent],
|
|
59
|
+
}]
|
|
60
|
+
}] });
|
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24tbW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWF0ZXJpYWwvZ2VvbG9jYXRpb24vc3JjL2dlb2xvY2F0aW9uLW1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FvQkc7QUFFSCxPQUFPLEVBQUMsa0JBQWtCLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQztBQUN2RCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFFN0MsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUN2QyxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDM0MsT0FBTyxFQUFDLGtCQUFrQixFQUFDLE1BQU0sOEJBQThCLENBQUM7QUFDaEUsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLHdCQUF3QixDQUFDO0FBQ3JELE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSx5QkFBeUIsQ0FBQztBQUN2RCxPQUFPLEVBQUMsdUJBQXVCLEVBQUMsTUFBTSxlQUFlLENBQUM7O0FBY3RELE1BQU0sT0FBTyxvQkFBb0I7O2lIQUFwQixvQkFBb0I7a0hBQXBCLG9CQUFvQixpQkFIaEI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YXIvbWF0ZXJpYWwvaW5wdXQnO1xuaW1wb3J0IHtBamZHZW9sb2NhdGlvbkNvbXBvbmVudH0gZnJvbSAnLi9nZW9sb2NhdGlvbic7XG5cbkBOZ01vZHVsZSh7XG4gIGltcG9ydHM6IFtcbiAgICBBamZUcmFuc2xvY29Nb2R1bGUsXG4gICAgQ29tbW9uTW9kdWxlLFxuICAgIEZvcm1zTW9kdWxlLFxuICAgIE1hdEljb25Nb2R1bGUsXG4gICAgTWF0SW5wdXRNb2R1bGUsXG4gICAgTWF0Rm9ybUZpZWxkTW9kdWxlLFxuICBdLFxuICBkZWNsYXJhdGlvbnM6IFtBamZHZW9sb2NhdGlvbkNvbXBvbmVudF0sXG4gIGV4cG9ydHM6IFtBamZHZW9sb2NhdGlvbkNvbXBvbmVudF0sXG59KVxuZXhwb3J0IGNsYXNzIEFqZkdlb2xvY2F0aW9uTW9kdWxlIHt9XG4iXX0=
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { AjfGeolocation } from '@ajf/core/geolocation';
|
|
23
|
+
import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation, } from '@angular/core';
|
|
24
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
25
|
+
import * as i0 from "@angular/core";
|
|
26
|
+
import * as i1 from "@angular/forms";
|
|
27
|
+
import * as i2 from "@angular/material/icon";
|
|
28
|
+
import * as i3 from "@angular/material/input";
|
|
29
|
+
import * as i4 from "@angular/material/form-field";
|
|
30
|
+
import * as i5 from "@ngneat/transloco";
|
|
31
|
+
export const GEOLOCATION_CONTROL_VALUE_ACCESSOR = {
|
|
32
|
+
provide: NG_VALUE_ACCESSOR,
|
|
33
|
+
useExisting: forwardRef(() => AjfGeolocationComponent),
|
|
34
|
+
multi: true,
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Ajf geolocation component.
|
|
38
|
+
*/
|
|
39
|
+
export class AjfGeolocationComponent extends AjfGeolocation {
|
|
40
|
+
constructor(cdr) {
|
|
41
|
+
super(cdr);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
AjfGeolocationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfGeolocationComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
AjfGeolocationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfGeolocationComponent, selector: "ajf-geolocation", providers: [GEOLOCATION_CONTROL_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<div class=\"flex-container\">\n <div class=\"flex-child\">\n <p>{{'Latitude'|transloco}}:</p>\n <mat-form-field>\n <input\n matInput\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"latitude\">\n </mat-form-field>\n </div>\n <div class=\"flex-child\">\n <p>{{'Longitude'|transloco}}:</p>\n <mat-form-field>\n <input\n matInput\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"longitude\">\n </mat-form-field>\n <button mat-raised-button (click)=\"getLocation()\">\n <mat-icon>location_on</mat-icon>\n </button>\n </div>\n</div>", styles: ["ajf-geolocation{display:block}ajf-geolocation button{background:none}ajf-geolocation .flex-container{display:flex;flex-wrap:wrap}ajf-geolocation .flex-child{white-space:nowrap}ajf-geolocation .flex-child p{display:inline-block;min-width:80px}ajf-geolocation .flex-child:first-child{margin-right:5px}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfGeolocationComponent, decorators: [{
|
|
47
|
+
type: Component,
|
|
48
|
+
args: [{ selector: 'ajf-geolocation', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [GEOLOCATION_CONTROL_VALUE_ACCESSOR], template: "<div class=\"flex-container\">\n <div class=\"flex-child\">\n <p>{{'Latitude'|transloco}}:</p>\n <mat-form-field>\n <input\n matInput\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"latitude\">\n </mat-form-field>\n </div>\n <div class=\"flex-child\">\n <p>{{'Longitude'|transloco}}:</p>\n <mat-form-field>\n <input\n matInput\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"longitude\">\n </mat-form-field>\n <button mat-raised-button (click)=\"getLocation()\">\n <mat-icon>location_on</mat-icon>\n </button>\n </div>\n</div>", styles: ["ajf-geolocation{display:block}ajf-geolocation button{background:none}ajf-geolocation .flex-container{display:flex;flex-wrap:wrap}ajf-geolocation .flex-child{white-space:nowrap}ajf-geolocation .flex-child p{display:inline-block;min-width:80px}ajf-geolocation .flex-child:first-child{margin-right:5px}\n"] }]
|
|
49
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9tYXRlcmlhbC9nZW9sb2NhdGlvbi9zcmMvZ2VvbG9jYXRpb24udHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9tYXRlcmlhbC9nZW9sb2NhdGlvbi9zcmMvZ2VvbG9jYXRpb24uaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FvQkc7QUFFSCxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFDckQsT0FBTyxFQUNMLHVCQUF1QixFQUV2QixTQUFTLEVBQ1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0tZmllbGQ+XG4gICAgICA8aW5wdXRcbiAgICAgICAgbWF0SW5wdXRcbiAgICAgICAgKGZvY3VzKT1cImZvY3VzSGFuZGxlcigpXCJcbiAgICAgICAgWyhuZ01vZGVsKV09XCJsYXRpdHVkZVwiPlxuICAgIDwvbWF0LWZvcm0tZmllbGQ+XG4gIDwvZGl2PlxuICA8ZGl2IGNsYXNzPVwiZmxleC1jaGlsZFwiPlxuICAgIDxwPnt7J0xvbmdpdHVkZSd8dHJhbnNsb2NvfX06PC9wPlxuICAgIDxtYXQtZm9ybS1maWVsZD5cbiAgICAgIDxpbnB1dFxuICAgICAgICBtYXRJbnB1dFxuICAgICAgICAoZm9jdXMpPVwiZm9jdXNIYW5kbGVyKClcIlxuICAgICAgICBbKG5nTW9kZWwpXT1cImxvbmdpdHVkZVwiPlxuICAgIDwvbWF0LWZvcm0tZmllbGQ+XG4gICAgPGJ1dHRvbiBtYXQtcmFpc2VkLWJ1dHRvbiAoY2xpY2spPVwiZ2V0TG9jYXRpb24oKVwiPlxuICAgICAgPG1hdC1pY29uPmxvY2F0aW9uX29uPC9tYXQtaWNvbj5cbiAgICA8L2J1dHRvbj5cbiAgPC9kaXY+XG48L2Rpdj4iXX0=
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export * from './geolocation';
|
|
23
|
+
export * from './geolocation-module';
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL21hdGVyaWFsL2dlb2xvY2F0aW9uL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQW9CRztBQUVILGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsc0JBQXNCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgKEMpIEdudWNvb3Agc29jLiBjb29wLlxuICpcbiAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBBZHZhbmNlZCBKU09OIGZvcm1zIChhamYpLlxuICpcbiAqIEFkdmFuY2VkIEpTT04gZm9ybXMgKGFqZikgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yXG4gKiBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgQWZmZXJvIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXNcbiAqIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLFxuICogb3IgKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBBZHZhbmNlZCBKU09OIGZvcm1zIChhamYpIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsXG4gKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZlxuICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVSBBZmZlcm9cbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy5cbiAqXG4gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgQWZmZXJvIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGFsb25nIHdpdGggQWR2YW5jZWQgSlNPTiBmb3JtcyAoYWpmKS5cbiAqIElmIG5vdCwgc2VlIGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8uXG4gKlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vZ2VvbG9jYXRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9nZW9sb2NhdGlvbi1tb2R1bGUnO1xuIl19
|
package/esm2020/time/time.mjs
CHANGED
|
@@ -37,9 +37,9 @@ export class AjfTime extends Base {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
AjfTime.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfTime, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
-
AjfTime.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfTime, selector: "ajf-time", providers: [AJF_TIME_CONTROL_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<div>\n <mat-form-field>\n <input\n matInput\n min=\"0\"\n max=\"23\"\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"hours\"\n type=\"number\">\n </mat-form-field>\n :\n <mat-form-field>\n <input\n matInput\n min=\"0\"\n max=\"59\"\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"minutes\"\n type=\"number\">\n </mat-form-field>\n</div>\n", styles: ["ajf-time .mat-mdc-form-field{width:
|
|
40
|
+
AjfTime.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfTime, selector: "ajf-time", providers: [AJF_TIME_CONTROL_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<div>\n <mat-form-field>\n <input\n matInput\n min=\"0\"\n max=\"23\"\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"hours\"\n type=\"number\">\n </mat-form-field>\n :\n <mat-form-field>\n <input\n matInput\n min=\"0\"\n max=\"59\"\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"minutes\"\n type=\"number\">\n </mat-form-field>\n</div>\n", styles: ["ajf-time .mat-mdc-form-field{width:3.5em;text-align:center}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
41
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfTime, decorators: [{
|
|
42
42
|
type: Component,
|
|
43
|
-
args: [{ selector: 'ajf-time', providers: [AJF_TIME_CONTROL_VALUE_ACCESSOR], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <mat-form-field>\n <input\n matInput\n min=\"0\"\n max=\"23\"\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"hours\"\n type=\"number\">\n </mat-form-field>\n :\n <mat-form-field>\n <input\n matInput\n min=\"0\"\n max=\"59\"\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"minutes\"\n type=\"number\">\n </mat-form-field>\n</div>\n", styles: ["ajf-time .mat-mdc-form-field{width:
|
|
43
|
+
args: [{ selector: 'ajf-time', providers: [AJF_TIME_CONTROL_VALUE_ACCESSOR], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <mat-form-field>\n <input\n matInput\n min=\"0\"\n max=\"23\"\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"hours\"\n type=\"number\">\n </mat-form-field>\n :\n <mat-form-field>\n <input\n matInput\n min=\"0\"\n max=\"59\"\n (focus)=\"focusHandler()\"\n [(ngModel)]=\"minutes\"\n type=\"number\">\n </mat-form-field>\n</div>\n", styles: ["ajf-time .mat-mdc-form-field{width:3.5em;text-align:center}\n"] }]
|
|
44
44
|
}], ctorParameters: function () { return []; } });
|
|
45
45
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL21hdGVyaWFsL3RpbWUvc3JjL3RpbWUudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9tYXRlcmlhbC90aW1lL3NyYy90aW1lLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBb0JHO0FBRUgsT0FBTyxFQUFDLE9BQU8sSUFBSSxJQUFJLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUMvQyxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxVQUFVLEVBRVYsaUJBQWlCLEdBQ2xCLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBdUIsaUJBQWlCLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQzs7Ozs7QUFFdkUsTUFBTSxDQUFDLE1BQU0sK0JBQStCLEdBQVE7SUFDbEQsT0FBTyxFQUFFLGlCQUFpQjtJQUMxQixXQUFXLEVBQUUsVUFBVSxDQUFDLEdBQUcsRUFBRSxDQUFDLE9BQU8sQ0FBQztJQUN0QyxLQUFLLEVBQUUsSUFBSTtDQUNaLENBQUM7QUFVRixNQUFNLE9BQU8sT0FBUSxTQUFRLElBQUk7SUFDL0I7UUFDRSxLQUFLLEVBQUUsQ0FBQztJQUNWLENBQUM7O29HQUhVLE9BQU87d0ZBQVAsT0FBTyxtQ0FKUCxDQUFDLCtCQUErQixDQUFDLGlEQzFDOUMsOGFBcUJBOzJGRHlCYSxPQUFPO2tCQVJuQixTQUFTOytCQUNFLFVB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9ydCBjbGFzcyBBamZUaW1lIGV4dGVuZHMgQmFzZSBpbXBsZW1lbnRzIENvbnRyb2xWYWx1ZUFjY2Vzc29yLCBPbkRlc3Ryb3kge1xuICBjb25zdHJ1Y3RvcigpIHtcbiAgICBzdXBlcigpO1xuICB9XG59XG4iLCI8ZGl2PlxuICA8bWF0LWZvcm0tZmllbGQ+XG4gICAgPGlucHV0XG4gICAgICAgIG1hdElucHV0XG4gICAgICAgIG1pbj1cIjBcIlxuICAgICAgICBtYXg9XCIyM1wiXG4gICAgICAgIChmb2N1cyk9XCJmb2N1c0hhbmRsZXIoKVwiXG4gICAgICAgIFsobmdNb2RlbCldPVwiaG91cnNcIlxuICAgICAgICB0eXBlPVwibnVtYmVyXCI+XG4gIDwvbWF0LWZvcm0tZmllbGQ+XG4gIDpcbiAgPG1hdC1mb3JtLWZpZWxkPlxuICAgIDxpbnB1dFxuICAgICAgICBtYXRJbnB1dFxuICAgICAgICBtaW49XCIwXCJcbiAgICAgICAgbWF4PVwiNTlcIlxuICAgICAgICAoZm9jdXMpPVwiZm9jdXNIYW5kbGVyKClcIlxuICAgICAgICBbKG5nTW9kZWwpXT1cIm1pbnV0ZXNcIlxuICAgICAgICB0eXBlPVwibnVtYmVyXCI+XG4gIDwvbWF0LWZvcm0tZmllbGQ+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AjfBarcode } from '@ajf/core/barcode';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
4
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
|
+
import { Subscription } from 'rxjs';
|
|
6
|
+
import { switchMap } from 'rxjs/operators';
|
|
5
7
|
import * as i1 from '@ajf/core/common';
|
|
6
8
|
import { AjfCommonModule } from '@ajf/core/common';
|
|
7
9
|
import * as i2 from '@angular/common';
|
|
@@ -10,9 +12,13 @@ import * as i3 from '@angular/material/button';
|
|
|
10
12
|
import { MatButtonModule } from '@angular/material/button';
|
|
11
13
|
import * as i4 from '@angular/material/icon';
|
|
12
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import * as i5 from '@angular/material/
|
|
15
|
+
import * as i5 from '@angular/material/form-field';
|
|
16
|
+
import * as i6 from '@angular/material/select';
|
|
17
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
18
|
+
import * as i7 from '@angular/material/core';
|
|
19
|
+
import * as i8 from '@angular/material/tabs';
|
|
14
20
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
15
|
-
import * as
|
|
21
|
+
import * as i9 from '@ngneat/transloco';
|
|
16
22
|
import { AjfTranslocoModule } from '@ajf/core/transloco';
|
|
17
23
|
|
|
18
24
|
/**
|
|
@@ -47,13 +53,33 @@ const BARCODE_CONTROL_VALUE_ACCESSOR = {
|
|
|
47
53
|
class AjfBarcodeComponent extends AjfBarcode {
|
|
48
54
|
constructor(cdr, renderer) {
|
|
49
55
|
super(cdr, renderer);
|
|
56
|
+
this.sourceSelectSub = Subscription.EMPTY;
|
|
57
|
+
this.resetSub = Subscription.EMPTY;
|
|
58
|
+
this.resetSub = this.resetEvt.subscribe(() => this.setupVideoSourceSub());
|
|
59
|
+
}
|
|
60
|
+
setupVideoSourceSub() {
|
|
61
|
+
if (this.videoSourceSelect == undefined)
|
|
62
|
+
return;
|
|
63
|
+
this.sourceSelectSub.unsubscribe();
|
|
64
|
+
this.sourceSelectSub = this.videoSourceSelect.valueChange
|
|
65
|
+
.pipe(switchMap(() => this.getStream()))
|
|
66
|
+
.subscribe(c => console.log(c));
|
|
67
|
+
}
|
|
68
|
+
ngAfterViewInit() {
|
|
69
|
+
this.initVideoStreams();
|
|
70
|
+
this.setupVideoSourceSub();
|
|
71
|
+
}
|
|
72
|
+
ngOnDestroy() {
|
|
73
|
+
this.stopCurrentStream();
|
|
74
|
+
this.sourceSelectSub.unsubscribe();
|
|
75
|
+
this.resetSub.unsubscribe();
|
|
50
76
|
}
|
|
51
77
|
}
|
|
52
78
|
AjfBarcodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfBarcodeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
53
|
-
AjfBarcodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfBarcodeComponent, selector: "ajf-barcode", providers: [BARCODE_CONTROL_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"value; else barcode\">\n <div class=\"ajf-code-container\">\n <span>{{ value }}</span>\n <button mat-raised-button (click)=\"reset()\">\n <mat-icon style=\"transform: rotate(90deg)\">format_align_justify</mat-icon>\n </button>\n </div>\n</ng-container>\n<ng-template #barcode>\n <mat-tab-group (selectedIndexChange)=\"onTabChange($event)\">\n <mat-tab [label]=\"'Image'| transloco\">\n <div class=\"ajf-drop-container\">\n <div class=\"ajf-dropzone\" ajfDnd (file)=\"onSelectDrop($event)\">\n <div class=\"ajf-text-wrapper\">\n <div class=\"ajf-centered\">\n <a mat-button (click)=\"fileInput.click()\">{{'Drop your image here or click to select'|transloco}}</a>\n </div>\n </div>\n </div>\n <div #barcodeImagePreview class=\"ajf-barcode-image-preview\"></div>\n </div>\n <input\n #fileInput\n type=\"file\"\n (change)=\"onSelectFile($event)\"\n multiple\n style=\"display: none\"\n />\n </mat-tab>\n <mat-tab [label]=\"'Camera'|transloco\">\n <
|
|
79
|
+
AjfBarcodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfBarcodeComponent, selector: "ajf-barcode", providers: [BARCODE_CONTROL_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"value; else barcode\">\n <div class=\"ajf-code-container\">\n <span>{{ value }}</span>\n <button mat-raised-button (click)=\"reset()\">\n <mat-icon style=\"transform: rotate(90deg)\">format_align_justify</mat-icon>\n </button>\n </div>\n</ng-container>\n<ng-template #barcode>\n <mat-tab-group (selectedIndexChange)=\"onTabChange($event)\">\n <mat-tab [label]=\"'Image'| transloco\">\n <div class=\"ajf-drop-container\">\n <div class=\"ajf-dropzone\" ajfDnd (file)=\"onSelectDrop($event)\">\n <div class=\"ajf-text-wrapper\">\n <div class=\"ajf-centered\">\n <a mat-button (click)=\"fileInput.click()\"\n >{{'Drop your image here or click to select'|transloco}}</a\n >\n </div>\n </div>\n </div>\n <div #barcodeImagePreview class=\"ajf-barcode-image-preview\"></div>\n </div>\n <input\n #fileInput\n type=\"file\"\n (change)=\"onSelectFile($event)\"\n multiple\n style=\"display: none\"\n />\n </mat-tab>\n <mat-tab [label]=\"'Camera'|transloco\">\n <mat-form-field\n appearance=\"fill\"\n class=\"ajf-video-device-select\"\n >\n <mat-label>Choose Video source</mat-label>\n <mat-select #videoSourceSelect\n ><mat-option *ngFor=\"let device of videoDevices|async\" [value]=\"device.deviceId\">\n {{device.label}}\n </mat-option></mat-select\n ></mat-form-field\n >\n <div class=\"ajf-barcode-video\">\n <ng-container *ngIf=\"supportsVideoStream; else noVideo\">\n <div #barcodeVideoPreview class=\"ajf-video-preview ajf-video-preview-hidden\">\n <div *ngIf=\"value && value.length > 0\">{{ value }}</div>\n </div>\n <video #barcodeVideo autoplay playsinline muted></video>\n </ng-container>\n <ng-template #noVideo>\n <div>NO VIDEO</div>\n </ng-template>\n </div>\n </mat-tab>\n </mat-tab-group>\n</ng-template>\n", styles: ["ajf-barcode{display:block}ajf-barcode .ajf-code-container{display:inline-flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-content:stretch;align-items:center}ajf-barcode .ajf-code-container button{margin-left:10px}ajf-barcode .ajf-drop-container{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-content:stretch;align-items:stretch;position:relative}ajf-barcode .ajf-drop-container .ajf-barcode-image-preview{position:absolute;inset:0;z-index:1;background-size:contain;background-repeat:no-repeat;background-position:center}ajf-barcode .ajf-drop-container .ajf-dropzone{z-index:2;order:0;flex:1 1 auto;align-self:auto;height:50vh;display:table;background-color:#eeeeee80;border:dotted 1px #aaa;overflow:hidden}ajf-barcode .ajf-drop-container .ajf-dropzone .ajf-text-wrapper{display:table-cell;vertical-align:middle}ajf-barcode .ajf-drop-container .ajf-dropzone .ajf-centered{font-family:sans-serif;font-size:1.3em;font-weight:700;text-align:center}ajf-barcode .ajf-video-device-select{width:100%}ajf-barcode .ajf-barcode-video{height:50vh;position:relative}ajf-barcode .ajf-barcode-video>video{width:100%;height:100%}ajf-barcode .ajf-barcode-video>.ajf-video-preview{position:absolute;inset:0;width:100%;height:100%;z-index:5;border:3px solid #000000}ajf-barcode .ajf-barcode-video>.ajf-video-preview.ajf-video-preview-hidden{display:none;position:relative}ajf-barcode .ajf-barcode-video>.ajf-video-preview.ajf-video-preview-hidden>div{position:absolute;right:0;left:0;bottom:-1em;height:2em;box-sizing:border-box;padding:.5em;background-color:#fff;border-radius:.5em}ajf-barcode .ajf-barcode-video>.ajf-barcode-switch-camera{position:absolute;top:1em;right:1em;z-index:10;padding:.5em;border-radius:.5em;background-color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.AjfDndDirective, selector: "[ajfDnd]", outputs: ["file"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i8.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "pipe", type: i9.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
54
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfBarcodeComponent, decorators: [{
|
|
55
81
|
type: Component,
|
|
56
|
-
args: [{ selector: 'ajf-barcode', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [BARCODE_CONTROL_VALUE_ACCESSOR], template: "<ng-container *ngIf=\"value; else barcode\">\n <div class=\"ajf-code-container\">\n <span>{{ value }}</span>\n <button mat-raised-button (click)=\"reset()\">\n <mat-icon style=\"transform: rotate(90deg)\">format_align_justify</mat-icon>\n </button>\n </div>\n</ng-container>\n<ng-template #barcode>\n <mat-tab-group (selectedIndexChange)=\"onTabChange($event)\">\n <mat-tab [label]=\"'Image'| transloco\">\n <div class=\"ajf-drop-container\">\n <div class=\"ajf-dropzone\" ajfDnd (file)=\"onSelectDrop($event)\">\n <div class=\"ajf-text-wrapper\">\n <div class=\"ajf-centered\">\n <a mat-button (click)=\"fileInput.click()\">{{'Drop your image here or click to select'|transloco}}</a>\n </div>\n </div>\n </div>\n <div #barcodeImagePreview class=\"ajf-barcode-image-preview\"></div>\n </div>\n <input\n #fileInput\n type=\"file\"\n (change)=\"onSelectFile($event)\"\n multiple\n style=\"display: none\"\n />\n </mat-tab>\n <mat-tab [label]=\"'Camera'|transloco\">\n <
|
|
82
|
+
args: [{ selector: 'ajf-barcode', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [BARCODE_CONTROL_VALUE_ACCESSOR], template: "<ng-container *ngIf=\"value; else barcode\">\n <div class=\"ajf-code-container\">\n <span>{{ value }}</span>\n <button mat-raised-button (click)=\"reset()\">\n <mat-icon style=\"transform: rotate(90deg)\">format_align_justify</mat-icon>\n </button>\n </div>\n</ng-container>\n<ng-template #barcode>\n <mat-tab-group (selectedIndexChange)=\"onTabChange($event)\">\n <mat-tab [label]=\"'Image'| transloco\">\n <div class=\"ajf-drop-container\">\n <div class=\"ajf-dropzone\" ajfDnd (file)=\"onSelectDrop($event)\">\n <div class=\"ajf-text-wrapper\">\n <div class=\"ajf-centered\">\n <a mat-button (click)=\"fileInput.click()\"\n >{{'Drop your image here or click to select'|transloco}}</a\n >\n </div>\n </div>\n </div>\n <div #barcodeImagePreview class=\"ajf-barcode-image-preview\"></div>\n </div>\n <input\n #fileInput\n type=\"file\"\n (change)=\"onSelectFile($event)\"\n multiple\n style=\"display: none\"\n />\n </mat-tab>\n <mat-tab [label]=\"'Camera'|transloco\">\n <mat-form-field\n appearance=\"fill\"\n class=\"ajf-video-device-select\"\n >\n <mat-label>Choose Video source</mat-label>\n <mat-select #videoSourceSelect\n ><mat-option *ngFor=\"let device of videoDevices|async\" [value]=\"device.deviceId\">\n {{device.label}}\n </mat-option></mat-select\n ></mat-form-field\n >\n <div class=\"ajf-barcode-video\">\n <ng-container *ngIf=\"supportsVideoStream; else noVideo\">\n <div #barcodeVideoPreview class=\"ajf-video-preview ajf-video-preview-hidden\">\n <div *ngIf=\"value && value.length > 0\">{{ value }}</div>\n </div>\n <video #barcodeVideo autoplay playsinline muted></video>\n </ng-container>\n <ng-template #noVideo>\n <div>NO VIDEO</div>\n </ng-template>\n </div>\n </mat-tab>\n </mat-tab-group>\n</ng-template>\n", styles: ["ajf-barcode{display:block}ajf-barcode .ajf-code-container{display:inline-flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-content:stretch;align-items:center}ajf-barcode .ajf-code-container button{margin-left:10px}ajf-barcode .ajf-drop-container{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-content:stretch;align-items:stretch;position:relative}ajf-barcode .ajf-drop-container .ajf-barcode-image-preview{position:absolute;inset:0;z-index:1;background-size:contain;background-repeat:no-repeat;background-position:center}ajf-barcode .ajf-drop-container .ajf-dropzone{z-index:2;order:0;flex:1 1 auto;align-self:auto;height:50vh;display:table;background-color:#eeeeee80;border:dotted 1px #aaa;overflow:hidden}ajf-barcode .ajf-drop-container .ajf-dropzone .ajf-text-wrapper{display:table-cell;vertical-align:middle}ajf-barcode .ajf-drop-container .ajf-dropzone .ajf-centered{font-family:sans-serif;font-size:1.3em;font-weight:700;text-align:center}ajf-barcode .ajf-video-device-select{width:100%}ajf-barcode .ajf-barcode-video{height:50vh;position:relative}ajf-barcode .ajf-barcode-video>video{width:100%;height:100%}ajf-barcode .ajf-barcode-video>.ajf-video-preview{position:absolute;inset:0;width:100%;height:100%;z-index:5;border:3px solid #000000}ajf-barcode .ajf-barcode-video>.ajf-video-preview.ajf-video-preview-hidden{display:none;position:relative}ajf-barcode .ajf-barcode-video>.ajf-video-preview.ajf-video-preview-hidden>div{position:absolute;right:0;left:0;bottom:-1em;height:2em;box-sizing:border-box;padding:.5em;background-color:#fff;border-radius:.5em}ajf-barcode .ajf-barcode-video>.ajf-barcode-switch-camera{position:absolute;top:1em;right:1em;z-index:10;padding:.5em;border-radius:.5em;background-color:#fff}\n"] }]
|
|
57
83
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; } });
|
|
58
84
|
|
|
59
85
|
/**
|
|
@@ -83,14 +109,18 @@ AjfBarcodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version
|
|
|
83
109
|
AjfBarcodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AjfBarcodeModule, declarations: [AjfBarcodeComponent], imports: [AjfCommonModule,
|
|
84
110
|
AjfTranslocoModule,
|
|
85
111
|
CommonModule,
|
|
112
|
+
FormsModule,
|
|
86
113
|
MatButtonModule,
|
|
87
114
|
MatIconModule,
|
|
115
|
+
MatSelectModule,
|
|
88
116
|
MatTabsModule], exports: [AjfBarcodeComponent] });
|
|
89
117
|
AjfBarcodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfBarcodeModule, imports: [AjfCommonModule,
|
|
90
118
|
AjfTranslocoModule,
|
|
91
119
|
CommonModule,
|
|
120
|
+
FormsModule,
|
|
92
121
|
MatButtonModule,
|
|
93
122
|
MatIconModule,
|
|
123
|
+
MatSelectModule,
|
|
94
124
|
MatTabsModule] });
|
|
95
125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfBarcodeModule, decorators: [{
|
|
96
126
|
type: NgModule,
|
|
@@ -99,8 +129,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
99
129
|
AjfCommonModule,
|
|
100
130
|
AjfTranslocoModule,
|
|
101
131
|
CommonModule,
|
|
132
|
+
FormsModule,
|
|
102
133
|
MatButtonModule,
|
|
103
134
|
MatIconModule,
|
|
135
|
+
MatSelectModule,
|
|
104
136
|
MatTabsModule,
|
|
105
137
|
],
|
|
106
138
|
declarations: [AjfBarcodeComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajf-material-barcode.mjs","sources":["../../../projects/material/barcode/src/barcode.ts","../../../projects/material/barcode/src/barcode.html","../../../projects/material/barcode/src/barcode-module.ts","../../../projects/material/barcode/src/public_api.ts","../../../projects/material/barcode/src/ajf-material-barcode.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfBarcode} from '@ajf/core/barcode';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Renderer2,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\n\nexport const BARCODE_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AjfBarcodeComponent),\n multi: true,\n};\n\n/**\n * Ajf barcode component.\n */\n@Component({\n selector: 'ajf-barcode',\n templateUrl: 'barcode.html',\n styleUrls: ['barcode.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [BARCODE_CONTROL_VALUE_ACCESSOR],\n})\nexport class AjfBarcodeComponent extends AjfBarcode {\n constructor(cdr: ChangeDetectorRef, renderer: Renderer2) {\n super(cdr, renderer);\n }\n}\n","<ng-container *ngIf=\"value; else barcode\">\n <div class=\"ajf-code-container\">\n <span>{{ value }}</span>\n <button mat-raised-button (click)=\"reset()\">\n <mat-icon style=\"transform: rotate(90deg)\">format_align_justify</mat-icon>\n </button>\n </div>\n</ng-container>\n<ng-template #barcode>\n <mat-tab-group (selectedIndexChange)=\"onTabChange($event)\">\n <mat-tab [label]=\"'Image'| transloco\">\n <div class=\"ajf-drop-container\">\n <div class=\"ajf-dropzone\" ajfDnd (file)=\"onSelectDrop($event)\">\n <div class=\"ajf-text-wrapper\">\n <div class=\"ajf-centered\">\n <a mat-button (click)=\"fileInput.click()\">{{'Drop your image here or click to select'|transloco}}</a>\n </div>\n </div>\n </div>\n <div #barcodeImagePreview class=\"ajf-barcode-image-preview\"></div>\n </div>\n <input\n #fileInput\n type=\"file\"\n (change)=\"onSelectFile($event)\"\n multiple\n style=\"display: none\"\n />\n </mat-tab>\n <mat-tab [label]=\"'Camera'|transloco\">\n <div class=\"ajf-barcode-video\">\n <ng-container *ngIf=\"supportsVideoStream; else noVideo\">\n <div *ngIf=\"showSwitchButton\" class=\"ajf-barcode-switch-camera\">\n <button mat-icon-button (click)=\"switchCamera()\"><mat-icon>switch_camera</mat-icon></button>\n </div>\n <div #barcodeVideoPreview class=\"ajf-video-preview ajf-video-preview-hidden\">\n <div *ngIf=\"value && value.length > 0\">{{ value }}</div>\n </div>\n <video #barcodeVideo autoplay playsinline muted></video>\n </ng-container>\n <ng-template #noVideo>\n\n </ng-template>\n </div>\n </mat-tab>\n </mat-tab-group>\n</ng-template>\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfCommonModule} from '@ajf/core/common';\nimport {AjfTranslocoModule} from '@ajf/core/transloco';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatTabsModule} from '@angular/material/tabs';\n\nimport {AjfBarcodeComponent} from './barcode';\n\n@NgModule({\n imports: [\n AjfCommonModule,\n AjfTranslocoModule,\n CommonModule,\n MatButtonModule,\n MatIconModule,\n MatTabsModule,\n ],\n declarations: [AjfBarcodeComponent],\n exports: [AjfBarcodeComponent],\n})\nexport class AjfBarcodeModule {}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './barcode';\nexport * from './barcode-module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AAaU,MAAA,8BAA8B,GAAQ;AACjD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,mBAAmB,CAAC;AAClD,IAAA,K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AAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,8BAA8B,CAAC,EAAA,QAAA,EAAA,2yDAAA,EAAA,MAAA,EAAA,CAAA,msDAAA,CAAA,EAAA,CAAA;;;AEhD7C;;;;;;;;;;;;;;;;;;;;AAoBG;MAwBU,gBAAgB,CAAA;;6GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAhB,gBAAgB,EAAA,YAAA,EAAA,CAHZ,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAPhC,eAAe;QACf,kBAAkB;QAClB,YAAY;QACZ,eAAe;QACf,aAAa;QACb,aAAa,aAGL,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAElB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAVzB,eAAe;QACf,kBAAkB;QAClB,YAAY;QACZ,eAAe;QACf,aAAa;QACb,aAAa,CAAA,EAAA,CAAA,CAAA;2FAKJ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAZ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,kBAAkB;wBAClB,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,aAAa;AACd,qBAAA;oBACD,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;iBAC/B,CAAA;;;AC3CD;;;;;;;;;;;;;;;;;;;;AAoBG;;ACpBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ajf-material-barcode.mjs","sources":["../../../projects/material/barcode/src/barcode.ts","../../../projects/material/barcode/src/barcode.html","../../../projects/material/barcode/src/barcode-module.ts","../../../projects/material/barcode/src/public_api.ts","../../../projects/material/barcode/src/ajf-material-barcode.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfBarcode} from '@ajf/core/barcode';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {Subscription} from 'rxjs';\nimport {switchMap} from 'rxjs/operators';\n\nexport const BARCODE_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AjfBarcodeComponent),\n multi: true,\n};\n\n/**\n * Ajf barcode component.\n */\n@Component({\n selector: 'ajf-barcode',\n templateUrl: 'barcode.html',\n styleUrls: ['barcode.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [BARCODE_CONTROL_VALUE_ACCESSOR],\n})\nexport class AjfBarcodeComponent extends AjfBarcode implements OnDestroy, AfterViewInit {\n sourceSelectSub: Subscription = Subscription.EMPTY;\n resetSub: Subscription = Subscription.EMPTY;\n constructor(cdr: ChangeDetectorRef, renderer: Renderer2) {\n super(cdr, renderer);\n this.resetSub = this.resetEvt.subscribe(() => this.setupVideoSourceSub());\n }\n\n setupVideoSourceSub() {\n if (this.videoSourceSelect == undefined) return;\n this.sourceSelectSub.unsubscribe();\n this.sourceSelectSub = this.videoSourceSelect.valueChange\n .pipe(switchMap(() => this.getStream()))\n .subscribe(c => console.log(c));\n }\n\n ngAfterViewInit(): void {\n this.initVideoStreams();\n this.setupVideoSourceSub();\n }\n\n ngOnDestroy(): void {\n this.stopCurrentStream();\n this.sourceSelectSub.unsubscribe();\n this.resetSub.unsubscribe();\n }\n}\n","<ng-container *ngIf=\"value; else barcode\">\n <div class=\"ajf-code-container\">\n <span>{{ value }}</span>\n <button mat-raised-button (click)=\"reset()\">\n <mat-icon style=\"transform: rotate(90deg)\">format_align_justify</mat-icon>\n </button>\n </div>\n</ng-container>\n<ng-template #barcode>\n <mat-tab-group (selectedIndexChange)=\"onTabChange($event)\">\n <mat-tab [label]=\"'Image'| transloco\">\n <div class=\"ajf-drop-container\">\n <div class=\"ajf-dropzone\" ajfDnd (file)=\"onSelectDrop($event)\">\n <div class=\"ajf-text-wrapper\">\n <div class=\"ajf-centered\">\n <a mat-button (click)=\"fileInput.click()\"\n >{{'Drop your image here or click to select'|transloco}}</a\n >\n </div>\n </div>\n </div>\n <div #barcodeImagePreview class=\"ajf-barcode-image-preview\"></div>\n </div>\n <input\n #fileInput\n type=\"file\"\n (change)=\"onSelectFile($event)\"\n multiple\n style=\"display: none\"\n />\n </mat-tab>\n <mat-tab [label]=\"'Camera'|transloco\">\n <mat-form-field\n appearance=\"fill\"\n class=\"ajf-video-device-select\"\n >\n <mat-label>Choose Video source</mat-label>\n <mat-select #videoSourceSelect\n ><mat-option *ngFor=\"let device of videoDevices|async\" [value]=\"device.deviceId\">\n {{device.label}}\n </mat-option></mat-select\n ></mat-form-field\n >\n <div class=\"ajf-barcode-video\">\n <ng-container *ngIf=\"supportsVideoStream; else noVideo\">\n <div #barcodeVideoPreview class=\"ajf-video-preview ajf-video-preview-hidden\">\n <div *ngIf=\"value && value.length > 0\">{{ value }}</div>\n </div>\n <video #barcodeVideo autoplay playsinline muted></video>\n </ng-container>\n <ng-template #noVideo>\n <div>NO VIDEO</div>\n </ng-template>\n </div>\n </mat-tab>\n </mat-tab-group>\n</ng-template>\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfCommonModule} from '@ajf/core/common';\nimport {AjfTranslocoModule} from '@ajf/core/transloco';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatTabsModule} from '@angular/material/tabs';\n\nimport {AjfBarcodeComponent} from './barcode';\nimport {MatSelectModule} from '@angular/material/select';\nimport {FormsModule} from '@angular/forms';\n\n@NgModule({\n imports: [\n AjfCommonModule,\n AjfTranslocoModule,\n CommonModule,\n FormsModule,\n MatButtonModule,\n MatIconModule,\n MatSelectModule,\n MatTabsModule,\n ],\n declarations: [AjfBarcodeComponent],\n exports: [AjfBarcodeComponent],\n})\nexport class AjfBarcodeModule {}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './barcode';\nexport * from './barcode-module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AAiBU,MAAA,8BAA8B,GAAQ;AACjD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,mBAAmB,CAAC;AAClD,IAAA,KAAK,EAAE,IAAI;EACX;AAEF;;AAEG;AASG,MAAO,mBAAoB,SAAQ,UAAU,CAAA;IAGjD,WAAY,CAAA,GAAsB,EAAE,QAAmB,EAAA;AACrD,QAAA,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAHvB,QAAA,IAAA,CAAA,eAAe,GAAiB,YAAY,CAAC,KAAK,CAAC;AACnD,QAAA,IAAA,CAAA,QAAQ,GAAiB,YAAY,CAAC,KAAK,CAAC;AAG1C,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KAC3E;IAED,mBAAmB,GAAA;AACjB,QAAA,IAAI,IAAI,CAAC,iBAAiB,IAAI,SAAS;YAAE,OAAO;AAChD,QAAA,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC;AACnC,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,iBAAiB,CAAC,WAAW;aACtD,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;AACvC,aAAA,SAAS,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,C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