@myrmidon/cadmus-layer-demo 10.0.0 → 10.1.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.
|
@@ -116,10 +116,10 @@ class LayerDemoComponent {
|
|
|
116
116
|
this.userLocation =
|
|
117
117
|
this._textLayerService.getSelectedLocationForEdit(this._textLayerService.getSelectedRange()) || undefined;
|
|
118
118
|
}
|
|
119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
120
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LayerDemoComponent, deps: [{ token: i1.FormBuilder }, { token: i2.TextLayerService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
120
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: LayerDemoComponent, isStandalone: false, selector: "cadmus-layer-demo", viewQueries: [{ propertyName: "_resultElement", first: true, predicate: ["resultElem"], descendants: true }], ngImport: i0, template: "<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Layered Text Demo</h3>\n </mat-card-header>\n <mat-card-content>\n <article>\n <p>\n Enter some base text and zero or more layer fragments locations, then\n click the render button. This renders the base text with all its ranges.\n </p>\n <p>\n Once the text has been decorated, select any portion of it, either\n including a decorated part, or not. Then, if you selected a part\n including decorations, click the location button with the checkmark\n (=get the location of the fragment to edit); else, click the location\n button with the plus (=get the location of a new fragment).\n </p>\n <p>\n This will show you the token-based coordinates corresponding to your\n selection, provided that if you include any portion of a decorated text\n you will get the full coordinates of the decoration; otherwise, you will\n just get the coordinates of the selected character(s).\n </p>\n <p>\n This behavior is used to allow users edit existing part fragments by\n just selecting any part of it, even partially; while they must be\n precise when they are creating a new fragment.\n </p>\n </article>\n <hr />\n\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\n <div>\n <mat-form-field>\n <mat-label>base text</mat-label>\n <textarea\n matInput\n type=\"text\"\n id=\"text\"\n maxlength=\"1000\"\n spellcheck=\"false\"\n formControlName=\"text\"\n ></textarea>\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field>\n <mat-label>location</mat-label>\n <input\n matInput\n type=\"text\"\n id=\"location\"\n required\n spellcheck=\"false\"\n formControlName=\"location\"\n />\n <mat-hint>Y.X@AxR</mat-hint>\n </mat-form-field>\n </div>\n\n <div>\n <mat-toolbar>\n <span>\n <button\n mat-icon-button\n (click)=\"addLocation()\"\n type=\"button\"\n matTooltip=\"Add the specified location\"\n >\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"clearLocations()\"\n type=\"button\"\n matTooltip=\"Remove all the locations\"\n >\n <mat-icon class=\"mat-warn\">delete_sweep</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n matTooltip=\"Render the decorated base text\"\n >\n <mat-icon class=\"mat-primary\">play_circle_outline</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForNew()\"\n type=\"button\"\n matTooltip=\"Get location for new item\"\n >\n <mat-icon>playlist_add</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForEdit()\"\n type=\"button\"\n matTooltip=\"Get location for selected item\"\n >\n <mat-icon>playlist_add_check</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Larger text\"\n (click)=\"makeLarger()\"\n [disabled]=\"textSize >= 24\"\n >\n <mat-icon>format_size</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Smaller text\"\n (click)=\"makeSmaller()\"\n [disabled]=\"textSize <= 12\"\n >\n <mat-icon>text_fields</mat-icon>\n </button>\n </span>\n <span class=\"tb-fill-remaining-space\"></span>\n <span>{{ userLocation }}</span>\n </mat-toolbar>\n </div>\n\n <table>\n <tbody>\n @for (loc of locations; track loc) {\n <tr>\n <td>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"removeLocation(loc)\"\n >\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ loc.toString() }}</td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Rendition</h3>\n </mat-card-header>\n <mat-card-content>\n <div\n [style.font-size]=\"textSize + 'px'\"\n [innerHtml]=\"result | safeHtml : 'html'\"\n id=\"result\"\n #resultElem\n ></div>\n <hr />\n <div>\n <code>{{ result }}</code>\n </div>\n </mat-card-content>\n</mat-card>\n", styles: ["textarea#text{min-width:300px;min-height:100px}:host ::ng-deep div#result{counter-reset:text-y-counter}:host ::ng-deep div#result p:before{content:counter(text-y-counter);counter-increment:text-y-counter;margin-right:6px;color:#a0a0a0}:host ::ng-deep span.fr{background-color:#ff0;border:1px solid silver;border-radius:6px}article{column-width:20em}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { 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: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i10.SafeHtmlPipe, name: "safeHtml" }] }); }
|
|
121
121
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LayerDemoComponent, decorators: [{
|
|
123
123
|
type: Component,
|
|
124
124
|
args: [{ selector: 'cadmus-layer-demo', standalone: false, template: "<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Layered Text Demo</h3>\n </mat-card-header>\n <mat-card-content>\n <article>\n <p>\n Enter some base text and zero or more layer fragments locations, then\n click the render button. This renders the base text with all its ranges.\n </p>\n <p>\n Once the text has been decorated, select any portion of it, either\n including a decorated part, or not. Then, if you selected a part\n including decorations, click the location button with the checkmark\n (=get the location of the fragment to edit); else, click the location\n button with the plus (=get the location of a new fragment).\n </p>\n <p>\n This will show you the token-based coordinates corresponding to your\n selection, provided that if you include any portion of a decorated text\n you will get the full coordinates of the decoration; otherwise, you will\n just get the coordinates of the selected character(s).\n </p>\n <p>\n This behavior is used to allow users edit existing part fragments by\n just selecting any part of it, even partially; while they must be\n precise when they are creating a new fragment.\n </p>\n </article>\n <hr />\n\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\n <div>\n <mat-form-field>\n <mat-label>base text</mat-label>\n <textarea\n matInput\n type=\"text\"\n id=\"text\"\n maxlength=\"1000\"\n spellcheck=\"false\"\n formControlName=\"text\"\n ></textarea>\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field>\n <mat-label>location</mat-label>\n <input\n matInput\n type=\"text\"\n id=\"location\"\n required\n spellcheck=\"false\"\n formControlName=\"location\"\n />\n <mat-hint>Y.X@AxR</mat-hint>\n </mat-form-field>\n </div>\n\n <div>\n <mat-toolbar>\n <span>\n <button\n mat-icon-button\n (click)=\"addLocation()\"\n type=\"button\"\n matTooltip=\"Add the specified location\"\n >\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"clearLocations()\"\n type=\"button\"\n matTooltip=\"Remove all the locations\"\n >\n <mat-icon class=\"mat-warn\">delete_sweep</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n matTooltip=\"Render the decorated base text\"\n >\n <mat-icon class=\"mat-primary\">play_circle_outline</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForNew()\"\n type=\"button\"\n matTooltip=\"Get location for new item\"\n >\n <mat-icon>playlist_add</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForEdit()\"\n type=\"button\"\n matTooltip=\"Get location for selected item\"\n >\n <mat-icon>playlist_add_check</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Larger text\"\n (click)=\"makeLarger()\"\n [disabled]=\"textSize >= 24\"\n >\n <mat-icon>format_size</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Smaller text\"\n (click)=\"makeSmaller()\"\n [disabled]=\"textSize <= 12\"\n >\n <mat-icon>text_fields</mat-icon>\n </button>\n </span>\n <span class=\"tb-fill-remaining-space\"></span>\n <span>{{ userLocation }}</span>\n </mat-toolbar>\n </div>\n\n <table>\n <tbody>\n @for (loc of locations; track loc) {\n <tr>\n <td>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"removeLocation(loc)\"\n >\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ loc.toString() }}</td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Rendition</h3>\n </mat-card-header>\n <mat-card-content>\n <div\n [style.font-size]=\"textSize + 'px'\"\n [innerHtml]=\"result | safeHtml : 'html'\"\n id=\"result\"\n #resultElem\n ></div>\n <hr />\n <div>\n <code>{{ result }}</code>\n </div>\n </mat-card-content>\n</mat-card>\n", styles: ["textarea#text{min-width:300px;min-height:100px}:host ::ng-deep div#result{counter-reset:text-y-counter}:host ::ng-deep div#result p:before{content:counter(text-y-counter);counter-increment:text-y-counter;margin-right:6px;color:#a0a0a0}:host ::ng-deep span.fr{background-color:#ff0;border:1px solid silver;border-radius:6px}article{column-width:20em}\n"] }]
|
|
125
125
|
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.TextLayerService }], propDecorators: { _resultElement: [{
|
|
@@ -132,8 +132,8 @@ const RouterModuleForChild = RouterModule.forChild([
|
|
|
132
132
|
{ path: '', pathMatch: 'full', component: LayerDemoComponent },
|
|
133
133
|
]);
|
|
134
134
|
class CadmusLayerDemoModule {
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
136
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.
|
|
135
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CadmusLayerDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
136
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: CadmusLayerDemoModule, declarations: [LayerDemoComponent], imports: [CommonModule,
|
|
137
137
|
FormsModule,
|
|
138
138
|
ReactiveFormsModule, i1$1.RouterModule,
|
|
139
139
|
// material
|
|
@@ -149,7 +149,7 @@ class CadmusLayerDemoModule {
|
|
|
149
149
|
// cadmus
|
|
150
150
|
CadmusCoreModule,
|
|
151
151
|
CadmusUiModule], exports: [LayerDemoComponent] }); }
|
|
152
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.
|
|
152
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CadmusLayerDemoModule, imports: [CommonModule,
|
|
153
153
|
FormsModule,
|
|
154
154
|
ReactiveFormsModule,
|
|
155
155
|
RouterModuleForChild,
|
|
@@ -165,7 +165,7 @@ class CadmusLayerDemoModule {
|
|
|
165
165
|
CadmusCoreModule,
|
|
166
166
|
CadmusUiModule] }); }
|
|
167
167
|
}
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CadmusLayerDemoModule, decorators: [{
|
|
169
169
|
type: NgModule,
|
|
170
170
|
args: [{
|
|
171
171
|
imports: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrmidon/cadmus-layer-demo",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "Cadmus - text layer demo page.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Cadmus"
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@angular/common": "^19.0.0",
|
|
18
18
|
"@angular/core": "^19.0.0",
|
|
19
|
-
"@myrmidon/ngx-tools": "^0.0
|
|
20
|
-
"@myrmidon/cadmus-core": "^10.
|
|
21
|
-
"@myrmidon/cadmus-ui": "^10.
|
|
19
|
+
"@myrmidon/ngx-tools": "^1.0.0",
|
|
20
|
+
"@myrmidon/cadmus-core": "^10.1.0",
|
|
21
|
+
"@myrmidon/cadmus-ui": "^10.1.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"tslib": "^2.3.0"
|