@acorex/core 18.14.0 → 18.14.1-next.1
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/translation/lib/translation.service.mjs +100 -7
- package/esm2022/translation/lib/translation.types.mjs +1 -1
- package/esm2022/translation/lib/translator.pipe.mjs +4 -13
- package/esm2022/utils/index.mjs +3 -1
- package/esm2022/utils/lib/resize.directive.mjs +117 -0
- package/esm2022/utils/lib/utils.module.mjs +18 -0
- package/esm2022/validation/lib/rules/required-rule.mjs +4 -3
- package/fesm2022/acorex-core-format.mjs +1 -1
- package/fesm2022/acorex-core-storage.mjs +1 -1
- package/fesm2022/acorex-core-translation.mjs +102 -18
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/fesm2022/acorex-core-utils.mjs +132 -2
- package/fesm2022/acorex-core-utils.mjs.map +1 -1
- package/fesm2022/acorex-core-validation.mjs +4 -3
- package/fesm2022/acorex-core-validation.mjs.map +1 -1
- package/package.json +1 -1
- package/translation/lib/translation.service.d.ts +2 -0
- package/translation/lib/translator.pipe.d.ts +0 -1
- package/utils/index.d.ts +2 -0
- package/utils/lib/resize.directive.d.ts +19 -0
- package/utils/lib/utils.module.d.ts +8 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AXEventService, AXEventTypes } from '@acorex/core/events';
|
2
2
|
import { Injectable, inject } from '@angular/core';
|
3
3
|
import { get as lodashGet, set as lodashSet } from 'lodash-es';
|
4
|
-
import { BehaviorSubject, catchError, finalize, firstValueFrom, forkJoin, lastValueFrom, map, of, shareReplay, startWith, switchMap, take, tap, } from 'rxjs';
|
4
|
+
import { BehaviorSubject, catchError, finalize, first, firstValueFrom, forkJoin, lastValueFrom, map, of, shareReplay, startWith, switchMap, take, tap, } from 'rxjs';
|
5
5
|
import { AX_TRANSLATION_CONFIG } from './translation.config';
|
6
6
|
import { AX_TRANSLATION_LOADER } from './translation.loader';
|
7
7
|
import * as i0 from "@angular/core";
|
@@ -138,12 +138,29 @@ export class AXTranslationService {
|
|
138
138
|
return translation;
|
139
139
|
}
|
140
140
|
translate(key, options) {
|
141
|
-
|
142
|
-
|
141
|
+
const result = this.findAXTranslateOptionsFromKey(key);
|
142
|
+
if (result.length) {
|
143
|
+
// result.forEach((item) => {
|
144
|
+
// this.langChanges$.pipe(
|
145
|
+
// switchMap((lang) => {
|
146
|
+
// return this.load(item.key, {
|
147
|
+
// params: options.params,
|
148
|
+
// scope: item.scope || options.scope || this.config.defaultScope,
|
149
|
+
// lang: item.lang || options.lang || this.config.defaultLang,
|
150
|
+
// });
|
151
|
+
// }),
|
152
|
+
// );
|
153
|
+
// });
|
154
|
+
return this.translateAsyncAXTranslate(key, options);
|
155
|
+
}
|
156
|
+
else {
|
157
|
+
if (options?.lang) {
|
158
|
+
return this.load(key, options);
|
159
|
+
}
|
160
|
+
return this.langChanges$.pipe(startWith(this.getActiveLang()), switchMap((lang) => {
|
161
|
+
return this.load(key, { ...options, lang: lang });
|
162
|
+
}));
|
143
163
|
}
|
144
|
-
return this.langChanges$.pipe(startWith(this.getActiveLang()), switchMap((lang) => {
|
145
|
-
return this.load(key, { ...options, lang: lang });
|
146
|
-
}));
|
147
164
|
}
|
148
165
|
async translateAsync(key, options) {
|
149
166
|
const { lang = this.getActiveLang(), scope = this.config.defaultScope } = options || {};
|
@@ -182,6 +199,82 @@ export class AXTranslationService {
|
|
182
199
|
// Perform parameter replacement
|
183
200
|
return this.getTranslation((translation || key), lang, scope, options?.params);
|
184
201
|
}
|
202
|
+
findAXTranslateOptionsFromKey(inputString) {
|
203
|
+
const regex = /<axt(?:\s+lang="([^"]*)")?(?:\s+scope="([^"]*)")?>(.*?)<\/axt>/g;
|
204
|
+
const result = [];
|
205
|
+
let match;
|
206
|
+
// Loop through all matches in the input string
|
207
|
+
while ((match = regex.exec(inputString)) !== null) {
|
208
|
+
result.push({
|
209
|
+
lang: match[1] || undefined,
|
210
|
+
scope: match[2] || undefined,
|
211
|
+
key: match[3] || undefined,
|
212
|
+
});
|
213
|
+
}
|
214
|
+
return result;
|
215
|
+
}
|
216
|
+
// private translateAsyncAXTranslate(key: string, options?: AXTranslateOptions) {
|
217
|
+
// // Use findAXTranslateOptions to parse all <axt> tags in the input string
|
218
|
+
// const regex = /(<axt(?:\s+lang="[^"]*")?(?:\s+scope="[^"]*")?>.*?<\/axt>)/g;
|
219
|
+
// const splitParts = key.split(regex); // Split into <axt> parts and text parts
|
220
|
+
// let translatedResult = '';
|
221
|
+
// for (const part of splitParts) {
|
222
|
+
// // Check if the part is an <axt> tag by using the findAXTranslateOptions function
|
223
|
+
// const optionsFromKey = this.findAXTranslateOptionsFromKey(part);
|
224
|
+
// if (optionsFromKey.length > 0) {
|
225
|
+
// // This is an <axt> part, translate it
|
226
|
+
// for (const parsed of optionsFromKey) {
|
227
|
+
// const parsedLang = parsed.lang || options.lang || this.getActiveLang();
|
228
|
+
// const parsedScope = parsed.scope || options.scope || this.config.defaultScope;
|
229
|
+
// const parsedKey = parsed.key;
|
230
|
+
// // Get the final translation, applying any params if needed
|
231
|
+
// const newTranslation = this.load(parsedKey, {
|
232
|
+
// lang: parsedLang,
|
233
|
+
// scope: parsedScope,
|
234
|
+
// params: options?.params,
|
235
|
+
// });
|
236
|
+
// newTranslation.pipe(first()).subscribe((translatedText) => {
|
237
|
+
// translatedResult += `${translatedText}`;
|
238
|
+
// });
|
239
|
+
// // Append the translated text
|
240
|
+
// }
|
241
|
+
// } else {
|
242
|
+
// // This is plain text, so add it as-is
|
243
|
+
// translatedResult += part;
|
244
|
+
// }
|
245
|
+
// console.log(translatedResult);
|
246
|
+
// }
|
247
|
+
// return of(translatedResult);
|
248
|
+
// }
|
249
|
+
translateAsyncAXTranslate(key, options) {
|
250
|
+
const regex = /(<axt(?:\s+lang="[^"]*")?(?:\s+scope="[^"]*")?>.*?<\/axt>)/g;
|
251
|
+
const splitParts = key.split(regex); // Split into <axt> parts and text parts
|
252
|
+
const translationObservables = [];
|
253
|
+
for (const part of splitParts) {
|
254
|
+
const optionsFromKey = this.findAXTranslateOptionsFromKey(part);
|
255
|
+
if (optionsFromKey.length > 0) {
|
256
|
+
// This is an <axt> part, translate it
|
257
|
+
for (const parsed of optionsFromKey) {
|
258
|
+
const parsedLang = parsed.lang || options?.lang || this.getActiveLang();
|
259
|
+
const parsedScope = parsed.scope || options?.scope || this.config.defaultScope;
|
260
|
+
const parsedKey = parsed.key;
|
261
|
+
// Push the translation observable to the array
|
262
|
+
translationObservables.push(this.load(parsedKey, {
|
263
|
+
lang: parsedLang,
|
264
|
+
scope: parsedScope,
|
265
|
+
params: options?.params,
|
266
|
+
}).pipe(first()));
|
267
|
+
}
|
268
|
+
}
|
269
|
+
else {
|
270
|
+
// This is plain text, so wrap it in an observable
|
271
|
+
translationObservables.push(of(part));
|
272
|
+
}
|
273
|
+
}
|
274
|
+
// Use forkJoin to wait for all observables to complete
|
275
|
+
return forkJoin(translationObservables).pipe(map((translatedParts) => translatedParts.join('')) // Join all translated parts
|
276
|
+
);
|
277
|
+
}
|
185
278
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXTranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
186
279
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXTranslationService, providedIn: 'root' }); }
|
187
280
|
}
|
@@ -189,4 +282,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
189
282
|
type: Injectable,
|
190
283
|
args: [{ providedIn: 'root' }]
|
191
284
|
}], ctorParameters: () => [] });
|
192
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS90cmFuc2xhdGlvbi9zcmMvbGliL3RyYW5zbGF0aW9uLnNlcnZpY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JhbnNsYXRpb25PYnNlcnZhYmxlcy5wdXNoKG9mKHBhcnQpKTtcbiAgICAgIH1cbiAgICB9XG4gIFxuICAgIC8vIFVzZSBmb3JrSm9pbiB0byB3YWl0IGZvciBhbGwgb2JzZXJ2YWJsZXMgdG8gY29tcGxldGVcbiAgICByZXR1cm4gZm9ya0pvaW4odHJhbnNsYXRpb25PYnNlcnZhYmxlcykucGlwZShcbiAgICAgIG1hcCgodHJhbnNsYXRlZFBhcnRzKSA9PiB0cmFuc2xhdGVkUGFydHMuam9pbignJykpIC8vIEpvaW4gYWxsIHRyYW5zbGF0ZWQgcGFydHNcbiAgICApO1xuICB9XG4gIFxufVxuIl19
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export {};
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb24udHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvdHJhbnNsYXRpb24vc3JjL2xpYi90cmFuc2xhdGlvbi50eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgQVhUcmFuc2xhdGVQYXJhbXM8VCA9IHVua25vd24+ID0gUmVjb3JkPHN0cmluZywgVD47XG5leHBvcnQgdHlwZSBBWFRyYW5zbGF0ZUhhc2hNYXA8VCA9IHVua25vd24+
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb24udHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvdHJhbnNsYXRpb24vc3JjL2xpYi90cmFuc2xhdGlvbi50eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgQVhUcmFuc2xhdGVQYXJhbXM8VCA9IHVua25vd24+ID0gUmVjb3JkPHN0cmluZywgVD47XG5leHBvcnQgdHlwZSBBWFRyYW5zbGF0ZUhhc2hNYXA8VCA9IHVua25vd24+ID0gUmVjb3JkPHN0cmluZywgVD47XG5leHBvcnQgdHlwZSBBWFRyYW5zbGF0aW9uID0gUmVjb3JkPHN0cmluZywgc3RyaW5nPjtcbmV4cG9ydCB0eXBlIEFYVHJhbnNsYXRlTGFuZyA9IHN0cmluZztcbmV4cG9ydCB0eXBlIEFYVHJhbnNsYXRlU2NvcGUgPSBzdHJpbmc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgQVhUcmFuc2xhdGVPcHRpb25zIHtcbiAgbGFuZz86IEFYVHJhbnNsYXRlTGFuZztcbiAgc2NvcGU/OiBBWFRyYW5zbGF0ZVNjb3BlO1xuICBwYXJhbXM/OiBBWFRyYW5zbGF0ZVBhcmFtcztcbn1cbiJdfQ==
|
@@ -8,19 +8,10 @@ export class AXTranslatorPipe {
|
|
8
8
|
this.service = service;
|
9
9
|
}
|
10
10
|
transform(key, options) {
|
11
|
-
if (!key)
|
12
|
-
return of('');
|
13
|
-
const splitKey = this.splitString(key);
|
14
|
-
return Array.isArray(splitKey)
|
15
|
-
? this.service.translate(splitKey[1], { ...options, scope: splitKey[0] })
|
16
|
-
: this.service.translate(key, options);
|
17
|
-
}
|
18
|
-
splitString(value) {
|
19
|
-
if (value.startsWith('#')) {
|
20
|
-
const [first, ...rest] = value.slice(1).split('.');
|
21
|
-
return [first, rest.join('.')];
|
11
|
+
if (!key) {
|
12
|
+
return of(''); // Return an empty observable if the key is not provided
|
22
13
|
}
|
23
|
-
return
|
14
|
+
return this.service.translate(key, options);
|
24
15
|
}
|
25
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXTranslatorPipe, deps: [{ token: i1.AXTranslationService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
26
17
|
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXTranslatorPipe, name: "translate" }); }
|
@@ -29,4 +20,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
29
20
|
type: Pipe,
|
30
21
|
args: [{ name: 'translate', pure: true }]
|
31
22
|
}], ctorParameters: () => [{ type: i1.AXTranslationService }] });
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRvci5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL3RyYW5zbGF0aW9uL3NyYy9saWIvdHJhbnNsYXRvci5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBQ3BELE9BQU8sRUFBYyxFQUFFLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDdEMsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7OztBQUk3RCxNQUFNLE9BQU8sZ0JBQWdCO0lBQzNCLFlBQW9CLE9BQTZCO1FBQTdCLFlBQU8sR0FBUCxPQUFPLENBQXNCO0lBQUcsQ0FBQztJQUVyRCxTQUFTLENBQUMsR0FBVyxFQUFFLE9BQTRCO1FBQ2pELElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQztZQUNULE9BQU8sRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsd0RBQXdEO1FBQ3pFLENBQUM7UUFDRCxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsRUFBRSxPQUF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4iXX0=
|
package/esm2022/utils/index.mjs
CHANGED
@@ -2,5 +2,7 @@ export * from './lib/auto-unsubscribe';
|
|
2
2
|
export * from './lib/color-util';
|
3
3
|
export * from './lib/drawing-util';
|
4
4
|
export * from './lib/html-util';
|
5
|
+
export * from './lib/resize.directive';
|
5
6
|
export * from './lib/string-util';
|
6
|
-
|
7
|
+
export * from './lib/utils.module';
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvdXRpbHMvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsb0JBQW9CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9hdXRvLXVuc3Vic2NyaWJlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbG9yLXV0aWwnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZHJhd2luZy11dGlsJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2h0bWwtdXRpbCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9yZXNpemUuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3N0cmluZy11dGlsJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3V0aWxzLm1vZHVsZSc7XG4iXX0=
|
@@ -0,0 +1,117 @@
|
|
1
|
+
import { Directive, ElementRef, HostListener, Input, NgZone, Renderer2 } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export class AXResizableDirective {
|
4
|
+
constructor(el, renderer, zone) {
|
5
|
+
this.el = el;
|
6
|
+
this.renderer = renderer;
|
7
|
+
this.zone = zone;
|
8
|
+
this.minWidth = 100; // Minimum width for the resizable element
|
9
|
+
this.isResizing = false;
|
10
|
+
this.createResizeHandle(); // Initialize the resize handle
|
11
|
+
}
|
12
|
+
// Create the resize handle element and apply inline styles
|
13
|
+
createResizeHandle() {
|
14
|
+
// Apply position relative to the container to allow the absolute positioning of the handle
|
15
|
+
this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
|
16
|
+
// Create the resize handle dynamically
|
17
|
+
this.resizeHandle = this.renderer.createElement('div');
|
18
|
+
this.renderer.addClass(this.resizeHandle, 'resize-handle');
|
19
|
+
this.renderer.appendChild(this.el.nativeElement, this.resizeHandle);
|
20
|
+
// Apply inline styles for the resize handle
|
21
|
+
this.renderer.setStyle(this.resizeHandle, 'width', '6px'); // Resize handle width
|
22
|
+
this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');
|
23
|
+
this.renderer.setStyle(this.resizeHandle, 'position', 'absolute');
|
24
|
+
this.renderer.setStyle(this.resizeHandle, 'top', '0');
|
25
|
+
this.renderer.setStyle(this.resizeHandle, 'right', '0');
|
26
|
+
this.renderer.setStyle(this.resizeHandle, 'bottom', '0');
|
27
|
+
this.renderer.setStyle(this.resizeHandle, 'cursor', 'ew-resize'); // Horizontal resize cursor
|
28
|
+
this.renderer.setStyle(this.resizeHandle, 'z-index', '10');
|
29
|
+
this.renderer.setStyle(this.resizeHandle, 'transition', 'background-color 0.2s ease');
|
30
|
+
this.renderer.setStyle(this.resizeHandle, 'border-radius', '4px');
|
31
|
+
}
|
32
|
+
// Mouse down event: Start resizing
|
33
|
+
onMouseDown(event) {
|
34
|
+
// Only allow resizing when clicking on the handle
|
35
|
+
const handleRect = this.resizeHandle.getBoundingClientRect();
|
36
|
+
if (event.clientX >= handleRect.left && event.clientX <= handleRect.right) {
|
37
|
+
this.zone.runOutsideAngular(() => {
|
38
|
+
this.isResizing = true;
|
39
|
+
document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode
|
40
|
+
// Change resize handle color to blue when resizing starts
|
41
|
+
this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff');
|
42
|
+
event.preventDefault();
|
43
|
+
});
|
44
|
+
}
|
45
|
+
}
|
46
|
+
// Mouse move event: Resize the element
|
47
|
+
onMouseMove(event) {
|
48
|
+
this.zone.runOutsideAngular(() => {
|
49
|
+
if (this.isResizing) {
|
50
|
+
const rect = this.el.nativeElement.getBoundingClientRect();
|
51
|
+
let newWidth;
|
52
|
+
// Resize logic (LTR or RTL support)
|
53
|
+
if (document.documentElement.dir === 'rtl') {
|
54
|
+
newWidth = rect.right - event.clientX;
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
newWidth = event.clientX - rect.left;
|
58
|
+
}
|
59
|
+
// Ensure the width does not go below the minimum width
|
60
|
+
if (newWidth > this.minWidth) {
|
61
|
+
this.renderer.setStyle(this.el.nativeElement, 'width', `${newWidth}px`);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
});
|
65
|
+
}
|
66
|
+
// Mouse up event: End resizing
|
67
|
+
onMouseUp() {
|
68
|
+
this.zone.runOutsideAngular(() => {
|
69
|
+
if (this.isResizing) {
|
70
|
+
this.isResizing = false;
|
71
|
+
document.body.style.cursor = 'default'; // Reset the cursor
|
72
|
+
// Reset the resize handle color to default when resizing ends
|
73
|
+
this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');
|
74
|
+
}
|
75
|
+
});
|
76
|
+
}
|
77
|
+
// Mouse enter event to change the background color (hover effect)
|
78
|
+
onMouseEnter() {
|
79
|
+
// Only change color to blue if not resizing
|
80
|
+
if (!this.isResizing) {
|
81
|
+
this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff'); // Blue color on hover
|
82
|
+
}
|
83
|
+
}
|
84
|
+
// Mouse leave event to reset the background color
|
85
|
+
onMouseLeave() {
|
86
|
+
// Only reset to default color if not resizing
|
87
|
+
if (!this.isResizing) {
|
88
|
+
this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)'); // Default background color
|
89
|
+
}
|
90
|
+
}
|
91
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXResizableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
|
92
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.0", type: AXResizableDirective, selector: "[axResizable]", inputs: { minWidth: "minWidth" }, host: { listeners: { "mousedown": "onMouseDown($event)", "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUp()", "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)" } }, ngImport: i0 }); }
|
93
|
+
}
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXResizableDirective, decorators: [{
|
95
|
+
type: Directive,
|
96
|
+
args: [{
|
97
|
+
selector: '[axResizable]', // Apply this directive on any element like <div axResizable></div>
|
98
|
+
}]
|
99
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { minWidth: [{
|
100
|
+
type: Input
|
101
|
+
}], onMouseDown: [{
|
102
|
+
type: HostListener,
|
103
|
+
args: ['mousedown', ['$event']]
|
104
|
+
}], onMouseMove: [{
|
105
|
+
type: HostListener,
|
106
|
+
args: ['document:mousemove', ['$event']]
|
107
|
+
}], onMouseUp: [{
|
108
|
+
type: HostListener,
|
109
|
+
args: ['document:mouseup']
|
110
|
+
}], onMouseEnter: [{
|
111
|
+
type: HostListener,
|
112
|
+
args: ['mouseenter', ['$event']]
|
113
|
+
}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nQgdG8gY2hhbmdlIHRoZSBiYWNrZ3JvdW5kIGNvbG9yIChob3ZlciBlZmZlY3QpXG4gIEBIb3N0TGlzdGVuZXIoJ21vdXNlZW50ZXInLCBbJyRldmVudCddKVxuICBvbk1vdXNlRW50ZXIoKTogdm9pZCB7XG4gICAgLy8gT25seSBjaGFuZ2UgY29sb3IgdG8gYmx1ZSBpZiBub3QgcmVzaXppbmdcbiAgICBpZiAoIXRoaXMuaXNSZXNpemluZykge1xuICAgICAgdGhpcy5yZW5kZXJlci5zZXRTdHlsZSh0aGlzLnJlc2l6ZUhhbmRsZSwgJ2JhY2tncm91bmQtY29sb3InLCAnIzAwN2JmZicpOyAvLyBCbHVlIGNvbG9yIG9uIGhvdmVyXG4gICAgfVxuICB9XG5cbiAgLy8gTW91c2UgbGVhdmUgZXZlbnQgdG8gcmVzZXQgdGhlIGJhY2tncm91bmQgY29sb3JcbiAgQEhvc3RMaXN0ZW5lcignbW91c2VsZWF2ZScsIFsnJGV2ZW50J10pXG4gIG9uTW91c2VMZWF2ZSgpOiB2b2lkIHtcbiAgICAvLyBPbmx5IHJlc2V0IHRvIGRlZmF1bHQgY29sb3IgaWYgbm90IHJlc2l6aW5nXG4gICAgaWYgKCF0aGlzLmlzUmVzaXppbmcpIHtcbiAgICAgIHRoaXMucmVuZGVyZXIuc2V0U3R5bGUodGhpcy5yZXNpemVIYW5kbGUsICdiYWNrZ3JvdW5kLWNvbG9yJywgJ3JnYmEoMCwgMCwgMCwgMC4yKScpOyAvLyBEZWZhdWx0IGJhY2tncm91bmQgY29sb3JcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
2
|
+
import { NgModule } from '@angular/core';
|
3
|
+
import { AXResizableDirective } from './resize.directive';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export class UtilsModule {
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: UtilsModule, declarations: [AXResizableDirective], imports: [CommonModule], exports: [AXResizableDirective] }); }
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: UtilsModule, imports: [CommonModule] }); }
|
9
|
+
}
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: UtilsModule, decorators: [{
|
11
|
+
type: NgModule,
|
12
|
+
args: [{
|
13
|
+
declarations: [AXResizableDirective],
|
14
|
+
imports: [CommonModule],
|
15
|
+
exports: [AXResizableDirective],
|
16
|
+
}]
|
17
|
+
}] });
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL3V0aWxzL3NyYy9saWIvdXRpbHMubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG9CQUFvQixDQUFDOztBQU8xRCxNQUFNLE9BQU8sV0FBVzs4R0FBWCxXQUFXOytHQUFYLFdBQVcsaUJBSlAsb0JBQW9CLGFBQ3pCLFlBQVksYUFDWixvQkFBb0I7K0dBRW5CLFdBQVcsWUFIWixZQUFZOzsyRkFHWCxXQUFXO2tCQUx2QixRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRSxDQUFDLG9CQUFvQixDQUFDO29CQUNwQyxPQUFPLEVBQUUsQ0FBQyxZQUFZLENBQUM7b0JBQ3ZCLE9BQU8sRUFBRSxDQUFDLG9CQUFvQixDQUFDO2lCQUNoQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5pbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgQVhSZXNpemFibGVEaXJlY3RpdmUgfSBmcm9tICcuL3Jlc2l6ZS5kaXJlY3RpdmUnO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtBWFJlc2l6YWJsZURpcmVjdGl2ZV0sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxuICBleHBvcnRzOiBbQVhSZXNpemFibGVEaXJlY3RpdmVdLFxufSlcbmV4cG9ydCBjbGFzcyBVdGlsc01vZHVsZSB7fVxuIl19
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AXTranslationService } from '@acorex/core/translation';
|
2
2
|
import { Injectable, inject } from '@angular/core';
|
3
|
-
import { find, isArray, isEmpty, isNull, isNumber, isString, isUndefined } from 'lodash-es';
|
3
|
+
import { find, isArray, isBoolean, isEmpty, isNull, isNumber, isString, isUndefined } from 'lodash-es';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
export class AXRequiredValidationRule {
|
6
6
|
constructor() {
|
@@ -11,6 +11,7 @@ export class AXRequiredValidationRule {
|
|
11
11
|
}
|
12
12
|
async validate(value, options) {
|
13
13
|
const rules = [
|
14
|
+
{ test: (val) => isBoolean(val) || !val },
|
14
15
|
{ test: (val) => isNull(val) || isUndefined(val) },
|
15
16
|
{ test: (val) => isString(val) && isEmpty(val.trim()) },
|
16
17
|
{ test: (val) => isNumber(val) && isNaN(val) },
|
@@ -21,7 +22,7 @@ export class AXRequiredValidationRule {
|
|
21
22
|
const translatedMessage = await this.traslationService.translateAsync('validation.messages.required', {
|
22
23
|
params: { title: options?.['title'] },
|
23
24
|
});
|
24
|
-
const message = failedRule ? options?.message ?? translatedMessage : null;
|
25
|
+
const message = failedRule ? (options?.message ?? translatedMessage) : null;
|
25
26
|
return {
|
26
27
|
rule: this.name,
|
27
28
|
result: isValid,
|
@@ -35,4 +36,4 @@ export class AXRequiredValidationRule {
|
|
35
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXRequiredValidationRule, decorators: [{
|
36
37
|
type: Injectable
|
37
38
|
}] });
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWlyZWQtcnVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS92YWxpZGF0aW9uL3NyYy9saWIvcnVsZXMvcmVxdWlyZWQtcnVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNuRCxPQUFPLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFLE1BQU0sRUFBRSxRQUFRLEVBQUUsUUFBUSxFQUFFLFdBQVcsRUFBRSxNQUFNLFdBQVcsQ0FBQzs7QUFhdkcsTUFBTSxPQUFPLHdCQUF3QjtJQURyQztRQUVVLHNCQUFpQixHQUFHLE1BQU0sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO0tBZ0MxRDtJQTlCQyxJQUFJLElBQUk7UUFDTixPQ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F5KHZhbCkgJiYgaXNFbXB0eSh2YWwpIH0sXG4gICAgXTtcblxuICAgIGNvbnN0IGZhaWxlZFJ1bGUgPSBmaW5kKHJ1bGVzLCAocnVsZSkgPT4gcnVsZS50ZXN0KHZhbHVlKSk7XG4gICAgY29uc3QgaXNWYWxpZCA9ICFmYWlsZWRSdWxlO1xuICAgIGNvbnN0IHRyYW5zbGF0ZWRNZXNzYWdlID0gYXdhaXQgdGhpcy50cmFzbGF0aW9uU2VydmljZS50cmFuc2xhdGVBc3luYygndmFsaWRhdGlvbi5tZXNzYWdlcy5yZXF1aXJlZCcsIHtcbiAgICAgIHBhcmFtczogeyB0aXRsZTogb3B0aW9ucz8uWyd0aXRsZSddIH0sXG4gICAgfSk7XG4gICAgY29uc3QgbWVzc2FnZSA9IGZhaWxlZFJ1bGUgPyAob3B0aW9ucz8ubWVzc2FnZSA/PyB0cmFuc2xhdGVkTWVzc2FnZSkgOiBudWxsO1xuXG4gICAgcmV0dXJuIHtcbiAgICAgIHJ1bGU6IHRoaXMubmFtZSxcbiAgICAgIHJlc3VsdDogaXNWYWxpZCxcbiAgICAgIG1lc3NhZ2U6IG1lc3NhZ2UsXG4gICAgICB2YWx1ZSxcbiAgICB9O1xuICB9XG59XG4iXX0=
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Injector, Injectable, inject, Pipe,
|
2
|
+
import { Injector, Injectable, inject, Pipe, Inject, NgModule } from '@angular/core';
|
3
3
|
import { AXEventService } from '@acorex/core/events';
|
4
4
|
import { Subject, filter, startWith, switchMap, of } from 'rxjs';
|
5
5
|
import { defaults, padStart, isInteger, get } from 'lodash-es';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { PLATFORM_ID,
|
3
|
+
import { PLATFORM_ID, Inject, Injectable, InjectionToken } from '@angular/core';
|
4
4
|
import { isBrowser } from '@acorex/core/platform';
|
5
5
|
import CryptoJS from 'crypto-es';
|
6
6
|
|