ts-glitter 16.0.5 → 16.0.6
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/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-widget.js +12 -2
- package/lowcode/backend-manager/bg-widget.ts +13 -2
- package/lowcode/cms-plugin/auto-reply.js +116 -7
- package/lowcode/cms-plugin/auto-reply.ts +136 -7
- package/lowcode/cms-plugin/shopping-finance-setting.js +2 -1
- package/lowcode/cms-plugin/shopping-finance-setting.ts +2 -1
- package/lowcode/cms-plugin/shopping-product-setting.js +4 -4
- package/lowcode/cms-plugin/shopping-product-setting.ts +2 -2
- package/package.json +1 -1
package/lowcode/Entry.js
CHANGED
|
@@ -79,7 +79,7 @@ export class Entry {
|
|
|
79
79
|
}
|
|
80
80
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
81
81
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
82
|
-
glitter.share.editerVersion = 'V_16.0.
|
|
82
|
+
glitter.share.editerVersion = 'V_16.0.6';
|
|
83
83
|
glitter.share.start = new Date();
|
|
84
84
|
const vm = {
|
|
85
85
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -81,7 +81,7 @@ export class Entry {
|
|
|
81
81
|
|
|
82
82
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
83
83
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
84
|
-
glitter.share.editerVersion = 'V_16.0.
|
|
84
|
+
glitter.share.editerVersion = 'V_16.0.6';
|
|
85
85
|
glitter.share.start = new Date();
|
|
86
86
|
const vm: {
|
|
87
87
|
appConfig: any;
|
|
@@ -334,13 +334,23 @@ export class BgWidget {
|
|
|
334
334
|
const numberRegex = /^\d+$/;
|
|
335
335
|
return numberRegex.test(str);
|
|
336
336
|
}
|
|
337
|
+
static selectLanguage() {
|
|
338
|
+
return ``;
|
|
339
|
+
}
|
|
337
340
|
static editeInput(obj) {
|
|
338
341
|
var _a, _b, _c, _d, _e, _f;
|
|
339
342
|
obj.title = (_a = obj.title) !== null && _a !== void 0 ? _a : '';
|
|
340
343
|
return html `
|
|
341
344
|
<div style="${(_b = obj.divStyle) !== null && _b !== void 0 ? _b : ''}">
|
|
342
|
-
${obj.title ? html
|
|
343
|
-
<div class="d-flex w-100 align-items-center border rounded-3 ${obj.readonly ? `bgw-input-readonly` : ``}" style="margin: 8px 0;">
|
|
345
|
+
${obj.title ? html `<div class="tx_normal fw-normal" style="${(_c = obj.titleStyle) !== null && _c !== void 0 ? _c : ''}">${obj.title}</div>` : ``}
|
|
346
|
+
<div class="d-flex w-100 align-items-center border rounded-3 ${obj.readonly ? `bgw-input-readonly` : ``}" style="margin: 8px 0;overflow: hidden;">
|
|
347
|
+
${obj.global_language ? `
|
|
348
|
+
<div class="bg-white d-flex align-items-center justify-content-center py-3 px-2 border-end" style="cursor: pointer;" onclick="${obj.gvc.event(() => {
|
|
349
|
+
BgWidget.selectLanguage();
|
|
350
|
+
})}">
|
|
351
|
+
<i class="fa-sharp fa-regular fa-earth-americas"></i>
|
|
352
|
+
</div>
|
|
353
|
+
` : ``}
|
|
344
354
|
${obj.startText ? html ` <div class="py-2 ps-3" style="white-space: nowrap">${obj.startText}</div>` : ''}
|
|
345
355
|
<input
|
|
346
356
|
class="bgw-input ${obj.readonly ? `bgw-input-readonly` : ``}"
|
|
@@ -453,6 +453,9 @@ export class BgWidget {
|
|
|
453
453
|
return numberRegex.test(str);
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
+
static selectLanguage(){
|
|
457
|
+
return ``
|
|
458
|
+
}
|
|
456
459
|
static editeInput(obj: {
|
|
457
460
|
gvc: GVC;
|
|
458
461
|
title: string;
|
|
@@ -468,12 +471,20 @@ export class BgWidget {
|
|
|
468
471
|
startText?: string;
|
|
469
472
|
endText?: string;
|
|
470
473
|
oninput?: (text: string) => void;
|
|
474
|
+
global_language?:boolean
|
|
471
475
|
}) {
|
|
472
476
|
obj.title = obj.title ?? '';
|
|
473
477
|
return html`
|
|
474
478
|
<div style="${obj.divStyle ?? ''}">
|
|
475
|
-
${obj.title ? html
|
|
476
|
-
<div class="d-flex w-100 align-items-center border rounded-3 ${obj.readonly ? `bgw-input-readonly` : ``}" style="margin: 8px 0;">
|
|
479
|
+
${obj.title ? html`<div class="tx_normal fw-normal" style="${obj.titleStyle ?? ''}">${obj.title}</div>` : ``}
|
|
480
|
+
<div class="d-flex w-100 align-items-center border rounded-3 ${obj.readonly ? `bgw-input-readonly` : ``}" style="margin: 8px 0;overflow: hidden;">
|
|
481
|
+
${obj.global_language ? `
|
|
482
|
+
<div class="bg-white d-flex align-items-center justify-content-center py-3 px-2 border-end" style="cursor: pointer;" onclick="${obj.gvc.event(()=>{
|
|
483
|
+
BgWidget.selectLanguage()
|
|
484
|
+
})}">
|
|
485
|
+
<i class="fa-sharp fa-regular fa-earth-americas"></i>
|
|
486
|
+
</div>
|
|
487
|
+
`:``}
|
|
477
488
|
${obj.startText ? html` <div class="py-2 ps-3" style="white-space: nowrap">${obj.startText}</div>` : ''}
|
|
478
489
|
<input
|
|
479
490
|
class="bgw-input ${obj.readonly ? `bgw-input-readonly` : ``}"
|
|
@@ -11,6 +11,9 @@ import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
|
11
11
|
import { Tool } from '../modules/tool.js';
|
|
12
12
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
13
13
|
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
14
|
+
import { ProductAi } from "./ai-generator/product-ai.js";
|
|
15
|
+
import { imageLibrary } from "../modules/image-library.js";
|
|
16
|
+
import { ShareDialog } from "../glitterBundle/dialog/ShareDialog.js";
|
|
14
17
|
const html = String.raw;
|
|
15
18
|
export class AutoReply {
|
|
16
19
|
static main(gvc, widget) {
|
|
@@ -216,13 +219,119 @@ export class AutoReply {
|
|
|
216
219
|
select: 'writer',
|
|
217
220
|
})}
|
|
218
221
|
</div>`,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
gvc.bindView((() => {
|
|
223
|
+
const id = gvc.glitter.getUUID();
|
|
224
|
+
return {
|
|
225
|
+
bind: id,
|
|
226
|
+
view: () => {
|
|
227
|
+
try {
|
|
228
|
+
return html `<div
|
|
229
|
+
class="d-flex justify-content-between align-items-center gap-3 mb-1"
|
|
230
|
+
style="cursor: pointer;"
|
|
231
|
+
onclick="${gvc.event(() => {
|
|
232
|
+
const originContent = `${vm.data.content}`;
|
|
233
|
+
BgWidget.fullDialog({
|
|
234
|
+
gvc: gvc,
|
|
235
|
+
title: (gvc2) => {
|
|
236
|
+
return `<div class="d-flex align-items-center" style="gap:10px;">${'內文編輯' + BgWidget.aiChatButton({
|
|
237
|
+
gvc: gvc2,
|
|
238
|
+
select: 'writer',
|
|
239
|
+
click: () => {
|
|
240
|
+
ProductAi.generateRichText(gvc, (text) => {
|
|
241
|
+
vm.data.content += text;
|
|
242
|
+
gvc.notifyDataChange(id);
|
|
243
|
+
gvc2.recreateView();
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
})}</div>`;
|
|
247
|
+
},
|
|
248
|
+
innerHTML: (gvc2) => {
|
|
249
|
+
return html `
|
|
250
|
+
<div>
|
|
251
|
+
${EditorElem.richText({
|
|
252
|
+
gvc: gvc2,
|
|
253
|
+
def: vm.data.content,
|
|
254
|
+
setHeight: '100vh',
|
|
255
|
+
hiddenBorder: true,
|
|
256
|
+
insertImageEvent: (editor) => {
|
|
257
|
+
const mark = `{{${Tool.randomString(8)}}}`;
|
|
258
|
+
editor.selection.setAtEnd(editor.$el.get(0));
|
|
259
|
+
editor.html.insert(mark);
|
|
260
|
+
editor.undo.saveStep();
|
|
261
|
+
imageLibrary.selectImageLibrary(gvc, (urlArray) => {
|
|
262
|
+
if (urlArray.length > 0) {
|
|
263
|
+
const imgHTML = urlArray
|
|
264
|
+
.map((url) => {
|
|
265
|
+
return html `
|
|
266
|
+
<img src="${url.data}"/>`;
|
|
267
|
+
})
|
|
268
|
+
.join('');
|
|
269
|
+
editor.html.set(editor.html
|
|
270
|
+
.get(0)
|
|
271
|
+
.replace(mark, html `
|
|
272
|
+
<div class="d-flex flex-column">
|
|
273
|
+
${imgHTML}
|
|
274
|
+
</div>`));
|
|
275
|
+
editor.undo.saveStep();
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
279
|
+
dialog.errorMessage({ text: '請選擇至少一張圖片' });
|
|
280
|
+
}
|
|
281
|
+
}, html `
|
|
282
|
+
<div
|
|
283
|
+
class="d-flex flex-column"
|
|
284
|
+
style="border-radius: 10px 10px 0px 0px;background: #F2F2F2;"
|
|
285
|
+
>
|
|
286
|
+
圖片庫
|
|
287
|
+
</div>`, {
|
|
288
|
+
mul: true,
|
|
289
|
+
cancelEvent: () => {
|
|
290
|
+
editor.html.set(editor.html.get(0).replace(mark, ''));
|
|
291
|
+
editor.undo.saveStep();
|
|
292
|
+
},
|
|
293
|
+
});
|
|
294
|
+
},
|
|
295
|
+
callback: (text) => {
|
|
296
|
+
vm.data.content = text;
|
|
297
|
+
},
|
|
298
|
+
rich_height: `calc(${window.parent.innerHeight}px - 70px - 58px - 49px - 64px - 40px + ${document.body.clientWidth < 800 ? `70` : `0`}px)`,
|
|
299
|
+
})}
|
|
300
|
+
</div>`;
|
|
301
|
+
},
|
|
302
|
+
footer_html: (gvc2) => {
|
|
303
|
+
return [
|
|
304
|
+
BgWidget.cancel(gvc2.event(() => {
|
|
305
|
+
vm.data.content = originContent;
|
|
306
|
+
gvc2.closeDialog();
|
|
307
|
+
})),
|
|
308
|
+
BgWidget.save(gvc2.event(() => {
|
|
309
|
+
gvc2.closeDialog();
|
|
310
|
+
gvc.notifyDataChange(id);
|
|
311
|
+
})),
|
|
312
|
+
].join('');
|
|
313
|
+
},
|
|
314
|
+
closeCallback: () => {
|
|
315
|
+
vm.data.content = originContent;
|
|
316
|
+
},
|
|
317
|
+
});
|
|
318
|
+
})}"
|
|
319
|
+
>
|
|
320
|
+
${(() => {
|
|
321
|
+
vm.data.content = vm.data.content || '';
|
|
322
|
+
const text = gvc.glitter.utText.removeTag(vm.data.content);
|
|
323
|
+
return BgWidget.richTextView(Tool.truncateString(text, 100));
|
|
324
|
+
})()}
|
|
325
|
+
</div>`;
|
|
326
|
+
}
|
|
327
|
+
catch (e) {
|
|
328
|
+
console.log(`error=>`, e);
|
|
329
|
+
return ``;
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
divCreate: {},
|
|
333
|
+
};
|
|
334
|
+
})())
|
|
226
335
|
].join('');
|
|
227
336
|
},
|
|
228
337
|
};
|
|
@@ -3,6 +3,9 @@ import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
|
3
3
|
import { Tool } from '../modules/tool.js';
|
|
4
4
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
5
5
|
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
6
|
+
import {ProductAi} from "./ai-generator/product-ai.js";
|
|
7
|
+
import {imageLibrary} from "../modules/image-library.js";
|
|
8
|
+
import {ShareDialog} from "../glitterBundle/dialog/ShareDialog.js";
|
|
6
9
|
|
|
7
10
|
const html = String.raw;
|
|
8
11
|
|
|
@@ -249,13 +252,139 @@ export class AutoReply {
|
|
|
249
252
|
select: 'writer',
|
|
250
253
|
})}
|
|
251
254
|
</div>`,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
gvc.bindView(
|
|
256
|
+
(() => {
|
|
257
|
+
const id = gvc.glitter.getUUID();
|
|
258
|
+
return {
|
|
259
|
+
bind: id,
|
|
260
|
+
view: () => {
|
|
261
|
+
|
|
262
|
+
try {
|
|
263
|
+
return html`<div
|
|
264
|
+
class="d-flex justify-content-between align-items-center gap-3 mb-1"
|
|
265
|
+
style="cursor: pointer;"
|
|
266
|
+
onclick="${gvc.event(() => {
|
|
267
|
+
|
|
268
|
+
const originContent = `${vm.data.content}`;
|
|
269
|
+
BgWidget.fullDialog({
|
|
270
|
+
gvc: gvc,
|
|
271
|
+
title: (gvc2) => {
|
|
272
|
+
return `<div class="d-flex align-items-center" style="gap:10px;">${'內文編輯' + BgWidget.aiChatButton({
|
|
273
|
+
gvc: gvc2,
|
|
274
|
+
select: 'writer',
|
|
275
|
+
click: () => {
|
|
276
|
+
ProductAi.generateRichText(gvc, (text) => {
|
|
277
|
+
vm.data.content += text;
|
|
278
|
+
gvc.notifyDataChange(id)
|
|
279
|
+
gvc2.recreateView()
|
|
280
|
+
})
|
|
281
|
+
}
|
|
282
|
+
})}</div>`
|
|
283
|
+
},
|
|
284
|
+
innerHTML: (gvc2) => {
|
|
285
|
+
return html`
|
|
286
|
+
<div>
|
|
287
|
+
${EditorElem.richText({
|
|
288
|
+
gvc: gvc2,
|
|
289
|
+
def: vm.data.content,
|
|
290
|
+
setHeight: '100vh',
|
|
291
|
+
hiddenBorder: true,
|
|
292
|
+
insertImageEvent: (editor) => {
|
|
293
|
+
const mark = `{{${Tool.randomString(8)}}}`;
|
|
294
|
+
editor.selection.setAtEnd(editor.$el.get(0));
|
|
295
|
+
editor.html.insert(mark);
|
|
296
|
+
editor.undo.saveStep();
|
|
297
|
+
imageLibrary.selectImageLibrary(
|
|
298
|
+
gvc,
|
|
299
|
+
(urlArray) => {
|
|
300
|
+
if (urlArray.length > 0) {
|
|
301
|
+
const imgHTML = urlArray
|
|
302
|
+
.map((url) => {
|
|
303
|
+
return html`
|
|
304
|
+
<img src="${url.data}"/>`;
|
|
305
|
+
})
|
|
306
|
+
.join('');
|
|
307
|
+
editor.html.set(
|
|
308
|
+
editor.html
|
|
309
|
+
.get(0)
|
|
310
|
+
.replace(
|
|
311
|
+
mark,
|
|
312
|
+
html`
|
|
313
|
+
<div class="d-flex flex-column">
|
|
314
|
+
${imgHTML}
|
|
315
|
+
</div>`
|
|
316
|
+
)
|
|
317
|
+
);
|
|
318
|
+
editor.undo.saveStep();
|
|
319
|
+
} else {
|
|
320
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
321
|
+
dialog.errorMessage({text: '請選擇至少一張圖片'});
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
html`
|
|
325
|
+
<div
|
|
326
|
+
class="d-flex flex-column"
|
|
327
|
+
style="border-radius: 10px 10px 0px 0px;background: #F2F2F2;"
|
|
328
|
+
>
|
|
329
|
+
圖片庫
|
|
330
|
+
</div>`,
|
|
331
|
+
{
|
|
332
|
+
mul: true,
|
|
333
|
+
cancelEvent: () => {
|
|
334
|
+
editor.html.set(editor.html.get(0).replace(mark, ''));
|
|
335
|
+
editor.undo.saveStep();
|
|
336
|
+
},
|
|
337
|
+
}
|
|
338
|
+
);
|
|
339
|
+
},
|
|
340
|
+
callback: (text) => {
|
|
341
|
+
vm.data.content = text;
|
|
342
|
+
},
|
|
343
|
+
rich_height: `calc(${
|
|
344
|
+
(window.parent as any).innerHeight
|
|
345
|
+
}px - 70px - 58px - 49px - 64px - 40px + ${
|
|
346
|
+
document.body.clientWidth < 800 ? `70` : `0`
|
|
347
|
+
}px)`,
|
|
348
|
+
})}
|
|
349
|
+
</div>`;
|
|
350
|
+
},
|
|
351
|
+
footer_html: (gvc2: GVC) => {
|
|
352
|
+
return [
|
|
353
|
+
BgWidget.cancel(
|
|
354
|
+
gvc2.event(() => {
|
|
355
|
+
vm.data.content = originContent;
|
|
356
|
+
gvc2.closeDialog();
|
|
357
|
+
})
|
|
358
|
+
),
|
|
359
|
+
BgWidget.save(
|
|
360
|
+
gvc2.event(() => {
|
|
361
|
+
gvc2.closeDialog();
|
|
362
|
+
gvc.notifyDataChange(id);
|
|
363
|
+
})
|
|
364
|
+
),
|
|
365
|
+
].join('');
|
|
366
|
+
},
|
|
367
|
+
closeCallback: () => {
|
|
368
|
+
vm.data.content = originContent;
|
|
369
|
+
},
|
|
370
|
+
});
|
|
371
|
+
})}"
|
|
372
|
+
>
|
|
373
|
+
${(() => {
|
|
374
|
+
vm.data.content=vm.data.content||''
|
|
375
|
+
const text = gvc.glitter.utText.removeTag(vm.data.content);
|
|
376
|
+
return BgWidget.richTextView(Tool.truncateString(text, 100));
|
|
377
|
+
})()}
|
|
378
|
+
</div>`;
|
|
379
|
+
}catch (e) {
|
|
380
|
+
console.log(`error=>`,e)
|
|
381
|
+
return ``
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
divCreate: {},
|
|
385
|
+
};
|
|
386
|
+
})()
|
|
387
|
+
)
|
|
259
388
|
].join('');
|
|
260
389
|
},
|
|
261
390
|
};
|
|
@@ -1008,6 +1008,7 @@ export class ShoppingFinanceSetting {
|
|
|
1008
1008
|
custom_delivery.name = text;
|
|
1009
1009
|
},
|
|
1010
1010
|
placeHolder: '請輸入自訂物流名稱',
|
|
1011
|
+
global_language: false
|
|
1011
1012
|
}),
|
|
1012
1013
|
form.view,
|
|
1013
1014
|
].join(BgWidget.mbContainer(12));
|
|
@@ -1265,7 +1266,7 @@ export class ShoppingFinanceSetting {
|
|
|
1265
1266
|
BgWidget.fullDialog({
|
|
1266
1267
|
gvc: gvc,
|
|
1267
1268
|
title: (gvc2) => {
|
|
1268
|
-
return `<div class="d-flex align-items-center" style="gap:10px;">${'
|
|
1269
|
+
return `<div class="d-flex align-items-center" style="gap:10px;">${'配送資訊' +
|
|
1269
1270
|
BgWidget.aiChatButton({
|
|
1270
1271
|
gvc: gvc2,
|
|
1271
1272
|
select: 'writer',
|
|
@@ -1173,6 +1173,7 @@ export class ShoppingFinanceSetting {
|
|
|
1173
1173
|
custom_delivery.name = text;
|
|
1174
1174
|
},
|
|
1175
1175
|
placeHolder: '請輸入自訂物流名稱',
|
|
1176
|
+
global_language:false
|
|
1176
1177
|
}),
|
|
1177
1178
|
form.view,
|
|
1178
1179
|
].join(BgWidget.mbContainer(12));
|
|
@@ -1443,7 +1444,7 @@ export class ShoppingFinanceSetting {
|
|
|
1443
1444
|
gvc: gvc,
|
|
1444
1445
|
title: (gvc2) => {
|
|
1445
1446
|
return `<div class="d-flex align-items-center" style="gap:10px;">${
|
|
1446
|
-
'
|
|
1447
|
+
'配送資訊' +
|
|
1447
1448
|
BgWidget.aiChatButton({
|
|
1448
1449
|
gvc: gvc2,
|
|
1449
1450
|
select: 'writer',
|
|
@@ -2643,7 +2643,7 @@ export class ShoppingProductSetting {
|
|
|
2643
2643
|
return img || BgWidget.noImageURL;
|
|
2644
2644
|
}
|
|
2645
2645
|
function getSpecTitle(first, second) {
|
|
2646
|
-
var _b, _c
|
|
2646
|
+
var _b, _c;
|
|
2647
2647
|
let first_t = postMD.specs.find((dd) => {
|
|
2648
2648
|
return dd.title === first;
|
|
2649
2649
|
});
|
|
@@ -2651,13 +2651,13 @@ export class ShoppingProductSetting {
|
|
|
2651
2651
|
console.log(`first=>${first}=>`, first_t);
|
|
2652
2652
|
first_t.language_title = (_b = first_t.language_title) !== null && _b !== void 0 ? _b : {};
|
|
2653
2653
|
if (!second) {
|
|
2654
|
-
return
|
|
2654
|
+
return first_t.language_title[sel_lan()] || first_t.title;
|
|
2655
2655
|
}
|
|
2656
2656
|
let second_t = first_t.option.find((dd) => {
|
|
2657
2657
|
return dd.title === second;
|
|
2658
2658
|
});
|
|
2659
|
-
second_t.language_title = (
|
|
2660
|
-
return
|
|
2659
|
+
second_t.language_title = (_c = second_t.language_title) !== null && _c !== void 0 ? _c : {};
|
|
2660
|
+
return second_t.language_title[sel_lan()] || second_t.title;
|
|
2661
2661
|
}
|
|
2662
2662
|
postMD.specs[0].option = (_b = postMD.specs[0].option) !== null && _b !== void 0 ? _b : [];
|
|
2663
2663
|
return {
|
|
@@ -3067,13 +3067,13 @@ export class ShoppingProductSetting {
|
|
|
3067
3067
|
console.log(`first=>${first}=>`,first_t)
|
|
3068
3068
|
first_t.language_title=first_t.language_title ?? {}
|
|
3069
3069
|
if(!second){
|
|
3070
|
-
return first_t.language_title[sel_lan()]
|
|
3070
|
+
return first_t.language_title[sel_lan()] || first_t.title
|
|
3071
3071
|
}
|
|
3072
3072
|
let second_t=first_t.option.find((dd:any)=>{
|
|
3073
3073
|
return dd.title===second
|
|
3074
3074
|
})
|
|
3075
3075
|
second_t.language_title=second_t.language_title ?? {}
|
|
3076
|
-
return second_t.language_title[sel_lan()]
|
|
3076
|
+
return second_t.language_title[sel_lan()] || second_t.title
|
|
3077
3077
|
}
|
|
3078
3078
|
|
|
3079
3079
|
postMD.specs[0].option = postMD.specs[0].option ?? [];
|