@sd-angular/core 19.0.0-beta.62 → 19.0.0-beta.64
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/components/section/index.d.ts +1 -0
- package/components/section/src/section-item/section-item.component.d.ts +7 -0
- package/components/section/src/section.component.d.ts +3 -2
- package/fesm2022/sd-angular-core-components-document-builder.mjs +15 -6
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-section.mjs +21 -5
- package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-workflow.mjs +15 -15
- package/fesm2022/sd-angular-core-components-workflow.mjs.map +1 -1
- package/package.json +58 -58
- package/sd-angular-core-19.0.0-beta.64.tgz +0 -0
- package/sd-angular-core-19.0.0-beta.62.tgz +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class SdSectionItem {
|
|
3
|
+
label: import("@angular/core").InputSignal<string>;
|
|
4
|
+
labelWidth: import("@angular/core").InputSignalWithTransform<string, string | null | undefined>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdSectionItem, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdSectionItem, "sd-section-item", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "labelWidth": { "alias": "labelWidth"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
7
|
+
}
|
|
@@ -2,7 +2,7 @@ import { SdBaseSecureComponent } from '@sd-angular/core/components/base';
|
|
|
2
2
|
import { SdColor } from '@sd-angular/core/utilities';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SdSection extends SdBaseSecureComponent {
|
|
5
|
-
private
|
|
5
|
+
#private;
|
|
6
6
|
title: import("@angular/core").InputSignal<string | null>;
|
|
7
7
|
subTitle: import("@angular/core").InputSignal<string>;
|
|
8
8
|
icon: import("@angular/core").InputSignal<string | null>;
|
|
@@ -10,8 +10,9 @@ export declare class SdSection extends SdBaseSecureComponent {
|
|
|
10
10
|
collapsed: import("@angular/core").ModelSignal<boolean>;
|
|
11
11
|
collapsable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
12
12
|
hideHeader: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
13
|
+
noPaddingBody: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
13
14
|
constructor();
|
|
14
15
|
toggleCollapse: () => void;
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdSection, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdSection, "sd-section", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "subTitle": { "alias": "subTitle"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconColor": { "alias": "iconColor"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "collapsable": { "alias": "collapsable"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["[sdHeaderLeft]", "[sdHeaderRight]", "*"], true, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdSection, "sd-section", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "subTitle": { "alias": "subTitle"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconColor": { "alias": "iconColor"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "collapsable": { "alias": "collapsable"; "required": false; "isSignal": true; }; "hideHeader": { "alias": "hideHeader"; "required": false; "isSignal": true; }; "noPaddingBody": { "alias": "noPaddingBody"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["[sdHeaderLeft]", "[sdHeaderRight]", "*"], true, never>;
|
|
17
18
|
}
|
|
@@ -376,6 +376,15 @@ class VariablePlugin extends Plugin {
|
|
|
376
376
|
const schema = editor.model.schema;
|
|
377
377
|
const conversion = editor.conversion;
|
|
378
378
|
const editingView = editor.editing.view;
|
|
379
|
+
// Cờ đánh dấu đang trong quá trình xử lý paste
|
|
380
|
+
let isPasting = false;
|
|
381
|
+
this.listenTo(editingView.document, 'clipboardInput', () => {
|
|
382
|
+
isPasting = true;
|
|
383
|
+
// Reset cờ sau khi quá trình paste (ngay trong cùng event loop/tick) hoàn tất
|
|
384
|
+
setTimeout(() => {
|
|
385
|
+
isPasting = false;
|
|
386
|
+
}, 0);
|
|
387
|
+
}, { priority: 'highest' });
|
|
379
388
|
// 1. Định nghĩa Schema (Model)
|
|
380
389
|
schema.register('variable', {
|
|
381
390
|
inheritAllFrom: '$inlineObject',
|
|
@@ -397,7 +406,6 @@ class VariablePlugin extends Plugin {
|
|
|
397
406
|
const widgetElement = viewWriter.createContainerElement('span', {
|
|
398
407
|
class: 'variable-widget',
|
|
399
408
|
'data-id': id,
|
|
400
|
-
'data-uuid': uuid,
|
|
401
409
|
'data-value': value,
|
|
402
410
|
'data-display': display,
|
|
403
411
|
'data-binding': 'false', // Luôn bắt đầu unbound — binding chỉ set qua bindValue()
|
|
@@ -439,7 +447,6 @@ class VariablePlugin extends Plugin {
|
|
|
439
447
|
classes: 'variable-widget ck-widget',
|
|
440
448
|
attributes: {
|
|
441
449
|
'data-id': true,
|
|
442
|
-
'data-uuid': true,
|
|
443
450
|
'data-value': true,
|
|
444
451
|
'data-display': true,
|
|
445
452
|
contenteditable: true,
|
|
@@ -459,7 +466,8 @@ class VariablePlugin extends Plugin {
|
|
|
459
466
|
}
|
|
460
467
|
return modelWriter.createElement('variable', {
|
|
461
468
|
id: viewElement.getAttribute('data-id'),
|
|
462
|
-
uuid:
|
|
469
|
+
// Fix trùng uuid: Nếu đang paste, TẠO MỚI uuid thay vì dùng uuid cũ từ HTML
|
|
470
|
+
uuid: isPasting ? v4() : (viewElement.getAttribute('data-uuid') ?? v4()),
|
|
463
471
|
value: viewElement.getAttribute('data-value'),
|
|
464
472
|
display: viewElement.getAttribute('data-display'),
|
|
465
473
|
...(bindingValue ? { bindingValue } : {}),
|
|
@@ -669,7 +677,8 @@ class VariablePlugin extends Plugin {
|
|
|
669
677
|
this.listenTo(editor.editing.view.document, 'clipboardInput', async (evt, data) => {
|
|
670
678
|
const dataTransfer = data.dataTransfer;
|
|
671
679
|
// Nếu có HTML chứa variable-widget thì để CKEditor xử lý (upcast converter)
|
|
672
|
-
|
|
680
|
+
// Việc chống trùng uuid (regenerate) đã được xử lý ở upcast converter dựa vào biến isPasting
|
|
681
|
+
let html = dataTransfer.getData('text/html');
|
|
673
682
|
if (html && html.includes('variable-widget')) {
|
|
674
683
|
return;
|
|
675
684
|
}
|
|
@@ -761,7 +770,7 @@ class VariablePlugin extends Plugin {
|
|
|
761
770
|
else if (fragment.type === 'variable' && fragment.variable) {
|
|
762
771
|
const variableElem = writer.createElement('variable', {
|
|
763
772
|
id: fragment.variable.id,
|
|
764
|
-
uuid:
|
|
773
|
+
uuid: v4(),
|
|
765
774
|
value: fragment.variable.value,
|
|
766
775
|
display: fragment.variable.display,
|
|
767
776
|
});
|
|
@@ -772,7 +781,7 @@ class VariablePlugin extends Plugin {
|
|
|
772
781
|
// Đặt con trỏ sau nội dung vừa paste
|
|
773
782
|
writer.setSelection(currentPosition);
|
|
774
783
|
});
|
|
775
|
-
});
|
|
784
|
+
}, { priority: 'high' });
|
|
776
785
|
}
|
|
777
786
|
#isSdDocumentBuilderVariableResult = (obj) => {
|
|
778
787
|
return (obj !== null &&
|