ngx-axis-appforge 0.0.46 → 0.0.47
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/axis-components/design/index.d.ts +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +27 -15
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs +2 -1
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs +3 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs.map +1 -1
- package/package.json +141 -141
|
@@ -249,7 +249,7 @@ declare class Design extends ValueAccess<DesignOptions> implements OnDestroy {
|
|
|
249
249
|
onTreeSelect(nodeIds: string[]): void;
|
|
250
250
|
onPreviewSelect(nodeIds: string[]): void;
|
|
251
251
|
private updateScopeWithNodeId;
|
|
252
|
-
loadSetting(nodeId: string): void;
|
|
252
|
+
loadSetting(nodeId: string, force?: boolean): void;
|
|
253
253
|
private buildScopeInfosGetter;
|
|
254
254
|
private buildScopeInfoSubject;
|
|
255
255
|
private buildComponentInfoForSetting;
|
|
@@ -1252,7 +1252,10 @@ class ShortcutKey {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
copy() {
|
|
1254
1254
|
const { selected } = this.design.tree.selectListSelection;
|
|
1255
|
-
|
|
1255
|
+
let options = selected.map(nodeId => this.design.optionsNodes.get(nodeId)).map(node => node?.options);
|
|
1256
|
+
if (options.length == 1) {
|
|
1257
|
+
options = options[0];
|
|
1258
|
+
}
|
|
1256
1259
|
this.design.clipboard.copy(JSON.stringify(options, null, 2));
|
|
1257
1260
|
}
|
|
1258
1261
|
cut() {
|
|
@@ -1562,24 +1565,29 @@ class Design extends ValueAccess {
|
|
|
1562
1565
|
scopeId = this.scopeInfos.get(scopeId)?.parentScopeId;
|
|
1563
1566
|
}
|
|
1564
1567
|
}
|
|
1565
|
-
loadSetting(nodeId) {
|
|
1568
|
+
loadSetting(nodeId, force = false) {
|
|
1566
1569
|
if (nodeId && this.optionsNodes.has(nodeId)) {
|
|
1567
|
-
if (
|
|
1568
|
-
|
|
1569
|
-
}
|
|
1570
|
-
else if (this.settingOptionsNodeId) {
|
|
1571
|
-
const oldNode = this.optionsNodes.get(this.settingOptionsNodeId);
|
|
1572
|
-
const newNode = this.optionsNodes.get(nodeId);
|
|
1573
|
-
if (newNode.canSetting && oldNode && oldNode.parentId == newNode.parentId && oldNode.settingType == newNode.settingType) {
|
|
1574
|
-
this.settingOptionsNodeId = nodeId;
|
|
1575
|
-
this.settingOptionsStr.set(JSON.stringify(newNode.options, null, " "));
|
|
1576
|
-
this.settingRef?.instance.writeValue(newNode.options);
|
|
1570
|
+
if (!force) {
|
|
1571
|
+
if (this.settingOptionsNodeId == nodeId) {
|
|
1577
1572
|
return;
|
|
1578
1573
|
}
|
|
1574
|
+
else if (this.settingOptionsNodeId) {
|
|
1575
|
+
const oldNode = this.optionsNodes.get(this.settingOptionsNodeId);
|
|
1576
|
+
const newNode = this.optionsNodes.get(nodeId);
|
|
1577
|
+
if (newNode.canSetting && oldNode && oldNode.parentId == newNode.parentId && oldNode.settingType == newNode.settingType) {
|
|
1578
|
+
this.settingOptionsNodeId = nodeId;
|
|
1579
|
+
this.settingOptionsStr.set(JSON.stringify(newNode.options, null, " "));
|
|
1580
|
+
this.settingRef?.instance.writeValue(newNode.options);
|
|
1581
|
+
return;
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1579
1584
|
}
|
|
1580
1585
|
this.resetSetting();
|
|
1581
|
-
this.settingOptionsNodeId = nodeId;
|
|
1582
1586
|
const optionsNode = this.optionsNodes.get(nodeId);
|
|
1587
|
+
if (!optionsNode.canSetting) {
|
|
1588
|
+
return;
|
|
1589
|
+
}
|
|
1590
|
+
this.settingOptionsNodeId = nodeId;
|
|
1583
1591
|
this.settingOptionsStr.set(JSON.stringify(optionsNode.options, null, " "));
|
|
1584
1592
|
if (optionsNode.settingType) {
|
|
1585
1593
|
const injector = Injector.create({
|
|
@@ -1803,8 +1811,12 @@ class Design extends ValueAccess {
|
|
|
1803
1811
|
if (this.settingOptionsNodeId) {
|
|
1804
1812
|
const optionsNode = this.optionsNodes.get(this.settingOptionsNodeId);
|
|
1805
1813
|
if (optionsNode) {
|
|
1806
|
-
|
|
1807
|
-
|
|
1814
|
+
if (optionsNode.canSetting && this.settingRef?.componentType == optionsNode.settingType) {
|
|
1815
|
+
this.settingRef?.instance?.writeValue(optionsNode.options);
|
|
1816
|
+
}
|
|
1817
|
+
else {
|
|
1818
|
+
this.loadSetting(optionsNode.id, true);
|
|
1819
|
+
}
|
|
1808
1820
|
}
|
|
1809
1821
|
}
|
|
1810
1822
|
}
|