@acorex/components 22.4.9 → 22.4.12

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-components-editor.mjs","sources":["../../../../packages/components/editor/src/lib/editor.component.ts","../../../../packages/components/editor/src/lib/editor.module.ts","../../../../packages/components/editor/src/acorex-components-editor.ts"],"sourcesContent":["import {\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/cdk/common';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { AXHtmlUtil } from '@acorex/core/utils';\nimport {\n afterNextRender,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n inject,\n input,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type EditorJS from '@editorjs/editorjs';\nimport type { OutputData } from '@editorjs/editorjs';\nimport { classes } from 'polytype';\nimport { EditorJsTool, type ImageToolConfig } from './editor.type';\n\n@Component({\n selector: 'ax-editor',\n template: `\n <div class=\"ax-editor-container ax-default {{ look }}\">\n <div class=\"ax-editor-holder\" #r></div>\n </div>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n <div class=\"ax-error-container\"></div>\n `,\n styleUrl: './editor.component.css',\n providers: [\n { provide: AXComponent, useExisting: AXEditorComponent },\n { provide: AXFocusableComponent, useExisting: AXEditorComponent },\n { provide: AXValuableComponent, useExisting: AXEditorComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXEditorComponent),\n multi: true,\n },\n ],\n inputs: ['look', 'readonly', 'disabled', 'value'],\n outputs: ['onValueChanged'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXEditorComponent extends classes(MXInputBaseValueComponent<OutputData>, MXLookComponent) {\n private toolLoaders: Record<EditorJsTool, () => Promise<any>> = {\n header: () => import('@editorjs/header'),\n list: () => import('@editorjs/list'),\n raw: () => import('@editorjs/raw'),\n quote: () => import('@editorjs/quote'),\n codeBox: () => import('@bomdi/codebox'),\n underline: () => import('@editorjs/underline'),\n color: () => import('editorjs-text-color-plugin'),\n image: () => import('@editorjs/image'),\n // linkTool: () => import('@editorjs/link'),\n // table: () => import('@editorjs/table'),\n // attaches: () => import('@editorjs/attaches'),\n // alignmentTuneTool: () => import('editorjs-text-alignment-blocktune'),\n // hyperlink: () => import('editorjs-hyperlink'),\n // delimiter: () => import('@editorjs/delimiter'),\n // inlineCode: () => import('@editorjs/inline-code'),\n // embed: () => import('@editorjs/embed'),\n // warning: () => import('@editorjs/warning'),\n // checklist: () => import('@editorjs/checklist'),\n // marker: () => import('@editorjs/marker'),\n // dragDrop: () => import('editorjs-drag-drop'),\n // undo: () => import('editorjs-undo'),\n // nestedList: () => import('@editorjs/nested-list'),\n // tooltip: () => import('editorjs-tooltip'),\n // paragraphWithAlignment: () => import('editorjs-paragraph-with-alignment'),\n };\n\n private editorHolder = viewChild<ElementRef<HTMLDivElement>>('r');\n\n private platform = inject(AXPlatform);\n\n modules = input<EditorJsTool[]>(['header', 'list', 'codeBox', 'underline', 'color']);\n\n imageConfig = input<ImageToolConfig>();\n\n protected editorClass: EditorJS;\n\n private colorConfig: any = {\n defaultColor: '#FF1300',\n type: 'text',\n customPicker: true,\n colorCollections: [\n '#EC7878',\n '#9C27B0',\n '#673AB7',\n '#3F51B5',\n '#0070FF',\n '#03A9F4',\n '#00BCD4',\n '#4CAF50',\n '#8BC34A',\n '#CDDC39',\n '#FFF',\n ],\n };\n\n private markerConfig: any = {\n defaultColor: '#FFBF00',\n type: 'marker',\n };\n\n private async loadEditorJsTools(selectedTools: EditorJsTool[]): Promise<Record<string, any>> {\n const results = await Promise.all(\n selectedTools.map(async (name) => {\n try {\n const mod = await this.toolLoaders[name]();\n const ToolClass = mod.default || mod;\n return [name, ToolClass];\n } catch (error) {\n console.error(`❌ Failed to load ${name}:`, error);\n return null;\n }\n }),\n );\n\n return Object.fromEntries(results.filter((r) => r).map(([key, value]) => [key, { class: value }]));\n }\n\n #init = afterNextRender(async () => {\n const tools = await this.loadEditorJsTools(this.modules());\n\n if (tools['color']) {\n tools['marker'] = { ...tools['color'] };\n tools['color'].config = this.colorConfig;\n tools['marker'].config = this.markerConfig;\n }\n\n if (tools['image'] && this.imageConfig()) {\n tools['image'].config = this.imageConfig();\n }\n\n if (tools['codeBox']) {\n const mode = this.platform.themeMode();\n const theme =\n mode === 'dark' || mode === 'system-dark'\n ? 'dark'\n : mode === 'light' || mode === 'system-light'\n ? 'light'\n : this.platform.isDark()\n ? 'dark'\n : 'light';\n tools['codeBox'].config = { useDefaultTheme: theme };\n }\n\n const EditorJS = (await import('@editorjs/editorjs')).default;\n\n if (tools['codeBox'].class.default) tools['codeBox'].class = tools['codeBox'].class.default;\n\n this.editorClass = new EditorJS({\n holder: this.editorHolder().nativeElement,\n tools,\n onChange: async (e) => {\n const content = await e.saver.save();\n if (content.blocks.length) {\n this.commitValue(content, true);\n } else {\n this.commitValue(null, true);\n }\n },\n data: this.value,\n readOnly: this.readonly || this.disabled,\n });\n });\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n const style = [];\n if (this.disabled) style.push('ax-disable');\n if (AXHtmlUtil.isRtl()) style.push('ax-rtl');\n return style;\n }\n\n @HostBinding('attr.name')\n private get __hostName(): string {\n return this.name;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AXEditorComponent } from './editor.component';\n\nconst COMPONENT = [AXEditorComponent];\n\nconst MODULES = [];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class EditorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAkDM,MAAO,iBAAkB,SAAQ,OAAO,EAAC,yBAAqC,GAAE,eAAe,CAAC,CAAA;AAxBtG,IAAA,WAAA,GAAA;;AAyBU,QAAA,IAAA,CAAA,WAAW,GAA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AAW;;;ACpL1B,MAAM,SAAS,GAAG,CAAC,iBAAiB,CAAC;AAErC,MAAM,OAAO,GAAG,EAAE;MAOL,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAZ,YAAY,EAAA,OAAA,EAAA,CATN,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAAjB,iBAAiB,CAAA,EAAA,CAAA,CAAA;AASvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAJV,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACXD;;AAEG;;"}
@@ -1,330 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { MXInputBaseValueComponent, AXValueChangedEvent } from '@acorex/cdk/common';
3
- import * as i1 from '@acorex/components/tabs';
4
- import { AXTabsComponent, AXTabLook, AXTabLocation } from '@acorex/components/tabs';
5
- import * as i2 from '@acorex/components/badge';
6
- import * as i3 from '@acorex/components/decorators';
7
- import * as i4 from '@angular/common';
8
- import * as i5 from '@angular/forms';
9
- import * as i6 from '@acorex/components/select-box';
10
- import * as i7 from '@acorex/components/form';
11
- import * as i8 from '@acorex/components/label';
12
- import * as i9 from '@acorex/components/check-box';
13
- import * as i10 from '@acorex/components/text-box';
14
- import * as i11 from '@acorex/core/translation';
15
- import * as i12 from '@acorex/components/button';
16
-
17
- interface IExpression {
18
- getExpression(): any;
19
- }
20
-
21
- declare class Custom$1 {
22
- specific: Specific$1;
23
- repeat: Repeat$1;
24
- between: Between$1;
25
- }
26
- declare class Repeat$1 {
27
- isRepeat: boolean;
28
- interval: number;
29
- startAt: number;
30
- }
31
- declare class Specific$1 {
32
- isSpecific: boolean;
33
- values: DropDownItem[];
34
- }
35
- declare class Between$1 {
36
- isBetween: boolean;
37
- from: number;
38
- to: number;
39
- }
40
- declare enum Type {
41
- Every = "every",
42
- Custom = "custom"
43
- }
44
- declare class DropDownItem {
45
- id: number;
46
- text: string;
47
- constructor(id: number, text: string);
48
- }
49
-
50
- declare class Day {
51
- type: DayType;
52
- baseOnWeek: BaseOnWeek;
53
- baseOnMonth: BaseOnMonth;
54
- }
55
- declare class BaseOnMonth {
56
- type: BaseOnMonthType;
57
- custom: BaseOnMonthCustom;
58
- before: number;
59
- }
60
- declare class BaseOnWeek {
61
- type: BaseOnWeekType;
62
- last: Last;
63
- custom: BaseOnWeekCustom;
64
- }
65
- declare class BaseOnWeekCustom {
66
- repeat: BaseOnWeekRepeat;
67
- specific: Specific;
68
- dayOfMonth: DayOfMonth;
69
- }
70
- declare class BaseOnMonthCustom {
71
- repeat: BaseOnMonthRepeat;
72
- specific: Specific;
73
- }
74
- declare class Last {
75
- day: number;
76
- }
77
- declare class BaseRepeat {
78
- isRepeat: boolean;
79
- interval: number;
80
- }
81
- declare class BaseOnWeekRepeat extends BaseRepeat {
82
- startAt: number;
83
- }
84
- declare class BaseOnMonthRepeat extends BaseRepeat {
85
- startAt: number;
86
- }
87
- declare class Specific {
88
- isSpecefic: boolean;
89
- values: DropDownItem[];
90
- }
91
- declare class DayOfMonth {
92
- isDayOfMonth: boolean;
93
- xst: number;
94
- day: number;
95
- }
96
- declare enum DayType {
97
- Every = "every",
98
- BOWeek = "boweek",
99
- BOMonth = "bomonth"
100
- }
101
- declare enum BaseOnWeekType {
102
- Last = "last",
103
- Custom = "custom"
104
- }
105
- declare enum BaseOnMonthType {
106
- Last = "last",
107
- Before = "before",
108
- Custom = "custom"
109
- }
110
-
111
- declare class DayService implements IExpression {
112
- private stringService;
113
- dayModel: Day;
114
- daysList: Array<string>;
115
- constructor();
116
- getExpression(): any;
117
- expressionValidation(preCronExpressionPattern: string, newCronExpressionPattern: string): string;
118
- reversExpression(cronExpressionPattern: string): void;
119
- reversExpressionBasedOnWeek(regex: string): void;
120
- reversExpressionBasedOnMonth(regex: string): void;
121
- static ɵfac: i0.ɵɵFactoryDeclaration<DayService, never>;
122
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
123
- }
124
-
125
- declare class Hours {
126
- type: Type;
127
- custom: Custom$1;
128
- }
129
-
130
- declare class HoursService implements IExpression {
131
- private stringService;
132
- hourModel: Hours;
133
- constructor();
134
- getExpression(): string;
135
- reversExpression(cronExpressionPattern: string): void;
136
- static ɵfac: i0.ɵɵFactoryDeclaration<HoursService, never>;
137
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
138
- }
139
-
140
- declare class Minutes {
141
- type: Type;
142
- custom: Custom$1;
143
- }
144
-
145
- declare class MinutesService implements IExpression {
146
- private stringService;
147
- minuteModel: Minutes;
148
- constructor();
149
- getExpression(): string;
150
- reversExpression(cronExpressionPattern: string): void;
151
- static ɵfac: i0.ɵɵFactoryDeclaration<MinutesService, never>;
152
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
153
- }
154
-
155
- declare class Month {
156
- type: Type;
157
- custom: Custom$1;
158
- }
159
-
160
- declare class MonthService implements IExpression {
161
- private stringService;
162
- monthModel: Month;
163
- monthList: Array<string>;
164
- constructor();
165
- getExpression(): string;
166
- reversExpression(cronExpressionPattern: string): void;
167
- static ɵfac: i0.ɵɵFactoryDeclaration<MonthService, never>;
168
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
169
- }
170
-
171
- declare class Seconds {
172
- type: Type;
173
- custom: Custom$1;
174
- }
175
-
176
- declare class SecondsService implements IExpression {
177
- private stringService;
178
- secondModel: Seconds;
179
- constructor();
180
- getExpression(): string;
181
- reversExpression(cronExpressionPattern: string): void;
182
- static ɵfac: i0.ɵɵFactoryDeclaration<SecondsService, never>;
183
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
184
- }
185
-
186
- declare class Year {
187
- type: Type;
188
- custom: Custom;
189
- }
190
- declare class Repeat extends Repeat$1 {
191
- startAt: number;
192
- }
193
- declare class Between extends Between$1 {
194
- from: number;
195
- to: number;
196
- }
197
- declare class Custom extends Custom$1 {
198
- repeat: Repeat;
199
- between: Between;
200
- }
201
-
202
- declare class YearService {
203
- private stringService;
204
- yearModel: Year;
205
- constructor();
206
- getExpression(): string;
207
- reversExpression(cronExpressionPattern: string): void;
208
- static ɵfac: i0.ɵɵFactoryDeclaration<YearService, never>;
209
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
210
- }
211
-
212
- declare class AXCronJobContainerComponent extends MXInputBaseValueComponent<string> {
213
- #private;
214
- protected secondsService: SecondsService;
215
- protected minutesService: MinutesService;
216
- protected hoursService: HoursService;
217
- protected monthService: MonthService;
218
- protected dayService: DayService;
219
- protected yearService: YearService;
220
- protected tabComponent: i0.Signal<AXTabsComponent>;
221
- protected activeTab: i0.WritableSignal<string>;
222
- private onGetModelFired;
223
- protected options: i0.WritableSignal<{
224
- fit: boolean;
225
- look: AXTabLook;
226
- location: AXTabLocation;
227
- }>;
228
- protected onGetModel(): void;
229
- protected internalValueChanged(cronExpressionPattern: string): void;
230
- private get __hostName();
231
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCronJobContainerComponent, never>;
232
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCronJobContainerComponent, "ax-cron-job-container", never, {}, { "onValueChanged": "onValueChanged"; }, never, never, true, never>;
233
- }
234
-
235
- declare class AXCronDayComponent {
236
- #private;
237
- protected dayService: DayService;
238
- protected boWeekDropDownList: DropDownItem[];
239
- protected boMonthDropDownList: DropDownItem[];
240
- protected daysIndexInMonth: number[];
241
- protected zeroTo30: number[];
242
- dayChanged: i0.OutputEmitterRef<void>;
243
- protected inputChange(): void;
244
- protected changeHandler(e: AXValueChangedEvent): void;
245
- protected changeHandler2(e: AXValueChangedEvent): void;
246
- protected get daysList(): Array<string>;
247
- protected get isBoWeek(): boolean;
248
- protected get isBoMonth(): boolean;
249
- protected get isBoWeekCustom(): boolean;
250
- protected get isBoMonthCustom(): boolean;
251
- protected get isBoMonthBefore(): boolean;
252
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCronDayComponent, never>;
253
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCronDayComponent, "ax-cron-day", never, {}, { "dayChanged": "dayChanged"; }, never, never, true, never>;
254
- }
255
-
256
- declare class AXCronHoursComponent {
257
- #private;
258
- protected hoursService: HoursService;
259
- protected dropdownList: DropDownItem[];
260
- protected zeroTo23: number[];
261
- hoursChanged: i0.OutputEmitterRef<void>;
262
- protected inputChange(): void;
263
- protected changeHandler(e: AXValueChangedEvent): void;
264
- protected get isCustom(): boolean;
265
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCronHoursComponent, never>;
266
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCronHoursComponent, "ax-cron-hours", never, {}, { "hoursChanged": "hoursChanged"; }, never, never, true, never>;
267
- }
268
-
269
- declare class AXCronMinutesComponent {
270
- #private;
271
- protected minutesService: MinutesService;
272
- protected dropdownList: DropDownItem[];
273
- protected zeroTo59: number[];
274
- minutesChanged: i0.OutputEmitterRef<void>;
275
- protected inputChange(): void;
276
- protected changeHandler(e: AXValueChangedEvent): void;
277
- protected get isCustom(): boolean;
278
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCronMinutesComponent, never>;
279
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCronMinutesComponent, "ax-cron-minutes", never, {}, { "minutesChanged": "minutesChanged"; }, never, never, true, never>;
280
- }
281
-
282
- declare class AXCronMonthComponent {
283
- #private;
284
- protected monthService: MonthService;
285
- protected dropdownList: DropDownItem[];
286
- protected dropdownList2: DropDownItem[];
287
- protected oneTo12: DropDownItem[];
288
- monthChanged: i0.OutputEmitterRef<void>;
289
- protected inputChange(): void;
290
- protected changeHandler(e: AXValueChangedEvent): void;
291
- protected get isCustom(): boolean;
292
- protected get monthsList(): Array<string>;
293
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCronMonthComponent, never>;
294
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCronMonthComponent, "ax-cron-month", never, {}, { "monthChanged": "monthChanged"; }, never, never, true, never>;
295
- }
296
-
297
- declare class AXCronSecondsComponent {
298
- #private;
299
- protected secondsService: SecondsService;
300
- secondsChanged: i0.OutputEmitterRef<void>;
301
- protected dropdownList: DropDownItem[];
302
- protected zeroTo59: number[];
303
- protected inputChange(e?: any): void;
304
- protected changeHandler(e: AXValueChangedEvent): void;
305
- protected get isCustom(): boolean;
306
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCronSecondsComponent, never>;
307
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCronSecondsComponent, "ax-cron-seconds", never, {}, { "secondsChanged": "secondsChanged"; }, never, never, true, never>;
308
- }
309
-
310
- declare class AXCronYearComponent {
311
- #private;
312
- protected yearService: YearService;
313
- protected dropdownList: DropDownItem[];
314
- protected oneTo100: DropDownItem[];
315
- yearChanged: i0.OutputEmitterRef<void>;
316
- protected inputChange(): void;
317
- protected changeHandler(e: AXValueChangedEvent): void;
318
- protected get isCustom(): boolean;
319
- protected getYearByOffset(offset: number): number;
320
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCronYearComponent, never>;
321
- static ɵcmp: i0.ɵɵComponentDeclaration<AXCronYearComponent, "ax-cron-year", never, {}, { "yearChanged": "yearChanged"; }, never, never, true, never>;
322
- }
323
-
324
- declare class AXCronJobModule {
325
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCronJobModule, never>;
326
- static ɵmod: i0.ɵɵNgModuleDeclaration<AXCronJobModule, never, [typeof i1.AXTabsModule, typeof i2.AXBadgeModule, typeof i3.AXDecoratorModule, typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.AXSelectBoxModule, typeof i7.AXFormModule, typeof i8.AXLabelModule, typeof i9.AXCheckBoxModule, typeof i10.AXTextBoxModule, typeof i11.AXTranslationModule, typeof i12.AXButtonModule, typeof i8.AXLabelModule, typeof AXCronJobContainerComponent, typeof AXCronDayComponent, typeof AXCronHoursComponent, typeof AXCronMinutesComponent, typeof AXCronMonthComponent, typeof AXCronSecondsComponent, typeof AXCronYearComponent], [typeof AXCronJobContainerComponent, typeof AXCronDayComponent, typeof AXCronHoursComponent, typeof AXCronMinutesComponent, typeof AXCronMonthComponent, typeof AXCronSecondsComponent, typeof AXCronYearComponent]>;
327
- static ɵinj: i0.ɵɵInjectorDeclaration<AXCronJobModule>;
328
- }
329
-
330
- export { AXCronDayComponent, AXCronHoursComponent, AXCronJobContainerComponent, AXCronJobModule, AXCronMinutesComponent, AXCronMonthComponent, AXCronSecondsComponent, AXCronYearComponent };
@@ -1,79 +0,0 @@
1
- import * as polytype from 'polytype';
2
- import * as i0 from '@angular/core';
3
- import { MXInputBaseValueComponent, MXLookComponent } from '@acorex/cdk/common';
4
- import EditorJS, { OutputData } from '@editorjs/editorjs';
5
-
6
- type EditorJsTool = 'header' | 'list' | 'raw' | 'image' | 'quote' | 'codeBox' | 'underline' | 'color';
7
- type ImageToolConfig = {
8
- endpoints?: {
9
- byFile: string;
10
- byUrl: string;
11
- };
12
- /** Name of the uploaded image field in POST request (default: "image") */
13
- field?: string;
14
- /** Mime-types of files accepted (default: "image/*") */
15
- types?: string;
16
- /** Extra data to send with upload requests */
17
- additionalRequestData?: Record<string, any>;
18
- /** Custom headers to include in upload requests */
19
- additionalRequestHeaders?: Record<string, string>;
20
- /** Placeholder text for the caption input (default: "Caption") */
21
- captionPlaceholder?: string;
22
- /** HTML content for the “Select file” button */
23
- buttonContent?: string;
24
- /** Custom uploader methods */
25
- uploader?: {
26
- uploadByFile?: (file: File) => Promise<{
27
- success: number;
28
- file: {
29
- url: string;
30
- };
31
- }>;
32
- uploadByUrl?: (url: string) => Promise<{
33
- success: number;
34
- file: {
35
- url: string;
36
- };
37
- }>;
38
- };
39
- /** Custom actions for the tool's settings menu */
40
- actions?: Array<Record<string, any>>;
41
- /** Feature toggles (border, background, caption, etc.) */
42
- features?: {
43
- border?: boolean;
44
- background?: boolean;
45
- caption?: boolean;
46
- [key: string]: any;
47
- };
48
- };
49
-
50
- declare const AXEditorComponent_base: polytype.Polytype.ClusteredConstructor<[{
51
- new (): MXInputBaseValueComponent<OutputData>;
52
- ɵfac: i0.ɵɵFactoryDeclaration<MXInputBaseValueComponent<any>, never>;
53
- ɵprov: i0.ɵɵInjectableDeclaration<any>;
54
- }, typeof MXLookComponent]>;
55
- declare class AXEditorComponent extends AXEditorComponent_base {
56
- #private;
57
- private toolLoaders;
58
- private editorHolder;
59
- private platform;
60
- modules: i0.InputSignal<EditorJsTool[]>;
61
- imageConfig: i0.InputSignal<ImageToolConfig>;
62
- protected editorClass: EditorJS;
63
- private colorConfig;
64
- private markerConfig;
65
- private loadEditorJsTools;
66
- private get __hostClass();
67
- private get __hostName();
68
- static ɵfac: i0.ɵɵFactoryDeclaration<AXEditorComponent, never>;
69
- static ɵcmp: i0.ɵɵComponentDeclaration<AXEditorComponent, "ax-editor", never, { "look": { "alias": "look"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "modules": { "alias": "modules"; "required": false; "isSignal": true; }; "imageConfig": { "alias": "imageConfig"; "required": false; "isSignal": true; }; }, { "onValueChanged": "onValueChanged"; }, never, ["ax-validation-rule"], true, never>;
70
- }
71
-
72
- declare class EditorModule {
73
- static ɵfac: i0.ɵɵFactoryDeclaration<EditorModule, never>;
74
- static ɵmod: i0.ɵɵNgModuleDeclaration<EditorModule, never, [typeof AXEditorComponent], [typeof AXEditorComponent]>;
75
- static ɵinj: i0.ɵɵInjectorDeclaration<EditorModule>;
76
- }
77
-
78
- export { AXEditorComponent, EditorModule };
79
- export type { EditorJsTool, ImageToolConfig };