ts-glitter 13.6.8 → 13.7.0

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 CHANGED
@@ -59,7 +59,7 @@ export class Entry {
59
59
  }
60
60
  window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
61
61
  console.log(`Entry-time:`, window.renderClock.stop());
62
- glitter.share.editerVersion = "V_13.6.8";
62
+ glitter.share.editerVersion = "V_13.7.0";
63
63
  glitter.share.start = (new Date());
64
64
  const vm = {
65
65
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -60,7 +60,7 @@ export class Entry {
60
60
  }
61
61
  (window as any).renderClock = (window as any).renderClock ?? clockF();
62
62
  console.log(`Entry-time:`, (window as any).renderClock.stop());
63
- glitter.share.editerVersion = "V_13.6.8";
63
+ glitter.share.editerVersion = "V_13.7.0";
64
64
  glitter.share.start = (new Date());
65
65
  const vm: {
66
66
  appConfig: any;
@@ -43,12 +43,12 @@ export class ToolSetting {
43
43
  view: () => {
44
44
  if (vm.function === 'edit') {
45
45
  return html `
46
- <div class="px-2 pt-3">${vm.edit_view}</div>`;
46
+ <div class="px-2 pt-2">${vm.edit_view}</div>`;
47
47
  }
48
48
  return html `
49
49
  ${(() => {
50
50
  if (document.body.clientWidth < 800) {
51
- return `<div class="w-100 d-flex align-items-center p-3 border-bottom mt-n2">
51
+ return `<div class="w-100 d-flex align-items-center p-3 border-bottom">
52
52
  <h5 class="offcanvas-title " style="max-width: calc(100% - 50px);overflow: hidden;text-overflow: ellipsis;">統一元件設定</h5>
53
53
  <div class="flex-fill"></div>
54
54
  <div
@@ -274,59 +274,65 @@ export class ToolSetting {
274
274
  callback: (response) => {
275
275
  if (response) {
276
276
  dialog.dataLoading({ visible: true });
277
- widget.config[0] = {
278
- id: gvc.glitter.getUUID(),
279
- js: './official_view_component/official.js',
280
- css: {
281
- class: {},
282
- style: {},
283
- },
284
- data: {
285
- refer_app: dd.appName,
286
- tag: dd.tag,
287
- list: [],
288
- carryData: {},
289
- },
290
- type: 'component',
291
- class: 'w-100',
292
- index: 0,
293
- label: dd.name,
294
- style: '',
295
- bundle: {},
296
- global: [],
297
- toggle: false,
298
- stylist: [],
299
- dataType: 'static',
300
- style_from: 'code',
301
- classDataType: 'static',
302
- preloadEvenet: {},
303
- share: {},
304
- "arrayData": {
305
- "clickEvent": [{
306
- "clickEvent": {
307
- "src": "./official_event/event.js",
308
- "route": "code"
309
- },
310
- "codeVersion": "v2",
311
- "code": " //判斷不是APP在顯示\n if ((gvc.glitter.deviceType === glitter.deviceTypeEnum.Web) && (glitter.getUrlParameter('device') !== 'mobile')) {\n return [subData]\n } else {\n return []\n }"
312
- }]
313
- },
314
- "gCount": "multiple"
315
- };
316
- ApiPageConfig.setPage({
317
- id: widget.id,
318
- appName: widget.appName,
319
- tag: widget.tag,
320
- name: widget.name,
321
- config: widget.config,
322
- group: widget.group,
323
- page_config: widget.page_config,
324
- page_type: widget.page_type,
325
- preview_image: widget.preview_image,
326
- favorite: widget.favorite,
327
- }).then((api) => {
328
- dialog.dataLoading({ visible: false });
329
- location.reload();
277
+ (window.glitterInitialHelper).getPageData({
278
+ tag: dd.tag,
279
+ appName: dd.appName
280
+ }, (d3) => {
281
+ widget.config[0] = {
282
+ id: gvc.glitter.getUUID(),
283
+ js: './official_view_component/official.js',
284
+ css: {
285
+ class: {},
286
+ style: {},
287
+ },
288
+ data: {
289
+ refer_app: dd.appName,
290
+ refer_form_data: d3.response.result[0].page_config.formData,
291
+ tag: dd.tag,
292
+ list: [],
293
+ carryData: {},
294
+ },
295
+ type: 'component',
296
+ class: 'w-100',
297
+ index: 0,
298
+ label: dd.name,
299
+ style: '',
300
+ bundle: {},
301
+ global: [],
302
+ toggle: false,
303
+ stylist: [],
304
+ dataType: 'static',
305
+ style_from: 'code',
306
+ classDataType: 'static',
307
+ preloadEvenet: {},
308
+ share: {},
309
+ "arrayData": {
310
+ "clickEvent": [{
311
+ "clickEvent": {
312
+ "src": "./official_event/event.js",
313
+ "route": "code"
314
+ },
315
+ "codeVersion": "v2",
316
+ "code": " //判斷不是APP在顯示\n if ((gvc.glitter.deviceType === glitter.deviceTypeEnum.Web) && (glitter.getUrlParameter('device') !== 'mobile')) {\n return [subData]\n } else {\n return []\n }"
317
+ }]
318
+ },
319
+ "gCount": "multiple"
320
+ };
321
+ ApiPageConfig.setPage({
322
+ id: widget.id,
323
+ appName: widget.appName,
324
+ tag: widget.tag,
325
+ name: widget.name,
326
+ config: widget.config,
327
+ group: widget.group,
328
+ page_config: widget.page_config,
329
+ page_type: widget.page_type,
330
+ preview_image: widget.preview_image,
331
+ favorite: widget.favorite,
332
+ }).then((api) => {
333
+ dialog.dataLoading({ visible: false });
334
+ location.reload();
335
+ });
330
336
  });
331
337
  }
332
338
  },
@@ -392,7 +398,7 @@ export class ToolSetting {
392
398
  `;
393
399
  },
394
400
  divCreate: {
395
- class: `p-2 mx-n2`,
401
+ class: `p-2 mx-n2 mt-n2`,
396
402
  },
397
403
  };
398
404
  })].join('');
@@ -44,12 +44,12 @@ export class ToolSetting {
44
44
  view: () => {
45
45
  if (vm.function === 'edit') {
46
46
  return html`
47
- <div class="px-2 pt-3">${vm.edit_view}</div>`;
47
+ <div class="px-2 pt-2">${vm.edit_view}</div>`;
48
48
  }
49
49
  return html`
50
50
  ${(() => {
51
51
  if (document.body.clientWidth < 800) {
52
- return `<div class="w-100 d-flex align-items-center p-3 border-bottom mt-n2">
52
+ return `<div class="w-100 d-flex align-items-center p-3 border-bottom">
53
53
  <h5 class="offcanvas-title " style="max-width: calc(100% - 50px);overflow: hidden;text-overflow: ellipsis;">統一元件設定</h5>
54
54
  <div class="flex-fill"></div>
55
55
  <div
@@ -289,60 +289,66 @@ export class ToolSetting {
289
289
  callback: (response) => {
290
290
  if (response) {
291
291
  dialog.dataLoading({visible: true});
292
- widget.config[0] = {
293
- id: gvc.glitter.getUUID(),
294
- js: './official_view_component/official.js',
295
- css: {
296
- class: {},
297
- style: {},
298
- },
299
- data: {
300
- refer_app: dd.appName,
301
- tag: dd.tag,
302
- list: [],
303
- carryData: {},
304
- },
305
- type: 'component',
306
- class: 'w-100',
307
- index: 0,
308
- label: dd.name,
309
- style: '',
310
- bundle: {},
311
- global: [],
312
- toggle: false,
313
- stylist: [],
314
- dataType: 'static',
315
- style_from: 'code',
316
- classDataType: 'static',
317
- preloadEvenet: {},
318
- share: {},
319
- "arrayData": {
320
- "clickEvent": [{
321
- "clickEvent": {
322
- "src": "./official_event/event.js",
323
- "route": "code"
324
- },
325
- "codeVersion": "v2",
326
- "code": " //判斷不是APP在顯示\n if ((gvc.glitter.deviceType === glitter.deviceTypeEnum.Web) && (glitter.getUrlParameter('device') !== 'mobile')) {\n return [subData]\n } else {\n return []\n }"
327
- }]
328
- },
329
- "gCount": "multiple"
330
- };
331
- ApiPageConfig.setPage({
332
- id: widget.id,
333
- appName: widget.appName,
334
- tag: widget.tag,
335
- name: widget.name,
336
- config: widget.config,
337
- group: widget.group,
338
- page_config: widget.page_config,
339
- page_type: widget.page_type,
340
- preview_image: widget.preview_image,
341
- favorite: widget.favorite,
342
- }).then((api) => {
343
- dialog.dataLoading({visible: false});
344
- location.reload();
345
- });
292
+ ((window as any).glitterInitialHelper).getPageData({
293
+ tag: dd.tag,
294
+ appName: dd.appName
295
+ },(d3:any)=>{
296
+ widget.config[0] = {
297
+ id: gvc.glitter.getUUID(),
298
+ js: './official_view_component/official.js',
299
+ css: {
300
+ class: {},
301
+ style: {},
302
+ },
303
+ data: {
304
+ refer_app: dd.appName,
305
+ refer_form_data:d3.response.result[0].page_config.formData,
306
+ tag: dd.tag,
307
+ list: [],
308
+ carryData: {},
309
+ },
310
+ type: 'component',
311
+ class: 'w-100',
312
+ index: 0,
313
+ label: dd.name,
314
+ style: '',
315
+ bundle: {},
316
+ global: [],
317
+ toggle: false,
318
+ stylist: [],
319
+ dataType: 'static',
320
+ style_from: 'code',
321
+ classDataType: 'static',
322
+ preloadEvenet: {},
323
+ share: {},
324
+ "arrayData": {
325
+ "clickEvent": [{
326
+ "clickEvent": {
327
+ "src": "./official_event/event.js",
328
+ "route": "code"
329
+ },
330
+ "codeVersion": "v2",
331
+ "code": " //判斷不是APP在顯示\n if ((gvc.glitter.deviceType === glitter.deviceTypeEnum.Web) && (glitter.getUrlParameter('device') !== 'mobile')) {\n return [subData]\n } else {\n return []\n }"
332
+ }]
333
+ },
334
+ "gCount": "multiple"
335
+ };
336
+ ApiPageConfig.setPage({
337
+ id: widget.id,
338
+ appName: widget.appName,
339
+ tag: widget.tag,
340
+ name: widget.name,
341
+ config: widget.config,
342
+ group: widget.group,
343
+ page_config: widget.page_config,
344
+ page_type: widget.page_type,
345
+ preview_image: widget.preview_image,
346
+ favorite: widget.favorite,
347
+ }).then((api) => {
348
+ dialog.dataLoading({visible: false});
349
+ location.reload();
350
+ });
351
+ })
346
352
  }
347
353
  },
348
354
  });
@@ -408,7 +414,7 @@ export class ToolSetting {
408
414
  `
409
415
  },
410
416
  divCreate: {
411
- class: `p-2 mx-n2`,
417
+ class: `p-2 mx-n2 mt-n2`,
412
418
  },
413
419
  };
414
420
  })].join('');
@@ -601,10 +601,14 @@ export const component = Plugin.createComponent(import.meta.url, (glitter, editM
601
601
  let html = '';
602
602
  let spiltCount = 0;
603
603
  function appendHtml(pageData, widget, initial, p_id, parent_array) {
604
+ var _a;
604
605
  const oWidget = widget;
606
+ oWidget.data.refer_form_data = (_a = oWidget.data.refer_form_data) !== null && _a !== void 0 ? _a : {};
605
607
  initialReferData(widget);
606
608
  const page_config = pageData.page_config;
607
609
  function getReferForm(widget, type) {
610
+ var _a;
611
+ widget.data.refer_form_data = (_a = widget.data.refer_form_data) !== null && _a !== void 0 ? _a : {};
608
612
  if ((widget.data.refer_app)) {
609
613
  widget.data.refer_form_data = widget.data.refer_form_data || (oWidget.data.refer_form_data && JSON.parse(JSON.stringify(oWidget.data.refer_form_data))) || JSON.parse(JSON.stringify(page_config.formData));
610
614
  if (type !== 'def') {
@@ -613,10 +613,12 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
613
613
 
614
614
  function appendHtml(pageData: any, widget: any, initial: boolean, p_id: string, parent_array: any) {
615
615
  const oWidget = widget
616
+ oWidget.data.refer_form_data=oWidget.data.refer_form_data ?? {}
616
617
  initialReferData(widget)
617
618
  const page_config = pageData.page_config;
618
619
 
619
620
  function getReferForm(widget: any, type: string) {
621
+ widget.data.refer_form_data=widget.data.refer_form_data??{}
620
622
  if ((widget.data.refer_app)) {
621
623
  widget.data.refer_form_data = widget.data.refer_form_data || (oWidget.data.refer_form_data && JSON.parse(JSON.stringify(oWidget.data.refer_form_data))) || JSON.parse(JSON.stringify(page_config.formData))
622
624
  if (type !== 'def') {