ts-glitter 13.8.835 → 13.8.836

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
@@ -70,7 +70,7 @@ export class Entry {
70
70
  }
71
71
  window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
72
72
  console.log(`Entry-time:`, window.renderClock.stop());
73
- glitter.share.editerVersion = 'V_13.8.835';
73
+ glitter.share.editerVersion = 'V_13.8.836';
74
74
  glitter.share.start = new Date();
75
75
  const vm = {
76
76
  appConfig: [],
@@ -169,7 +169,8 @@ export class Entry {
169
169
  if (glitter.getUrlParameter('type') === 'editor') {
170
170
  const dialog = new ShareDialog(glitter);
171
171
  dialog.dataLoading({ visible: true, text: '後台載入中' });
172
- Entry.toBackendEditor(glitter, () => { });
172
+ Entry.toBackendEditor(glitter, () => {
173
+ });
173
174
  }
174
175
  else if (glitter.getUrlParameter('type') === 'htmlEditor') {
175
176
  Entry.toHtmlEditor(glitter, vm, () => {
@@ -183,6 +184,9 @@ export class Entry {
183
184
  }
184
185
  else {
185
186
  try {
187
+ glitter.addMtScript(['https://kit.fontawesome.com/cccedec0f8.js'], () => {
188
+ }, () => {
189
+ });
186
190
  const appList = (yield ApiPageConfig.getAppList(undefined, GlobalUser.token)).response.result;
187
191
  localStorage.setItem('select_item', '0');
188
192
  if (appList.length === 0) {
@@ -348,7 +352,9 @@ export class Entry {
348
352
  {
349
353
  src: 'https://kit.fontawesome.com/cccedec0f8.js',
350
354
  },
351
- ], () => { }, () => { });
355
+ ], () => {
356
+ }, () => {
357
+ });
352
358
  glitter.addStyle(`
353
359
  @media (prefers-reduced-motion: no-preference) {
354
360
  :root {
@@ -382,7 +388,9 @@ export class Entry {
382
388
  src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
383
389
  type: 'module',
384
390
  };
385
- }), () => { }, () => { }, [{ key: 'async', value: 'true' }]);
391
+ }), () => {
392
+ }, () => {
393
+ }, [{ key: 'async', value: 'true' }]);
386
394
  glitter.htmlGenerate.loadScript(glitter, window.parent.editerData.setting
387
395
  .filter((dd) => {
388
396
  return ['widget', 'container', 'code'].indexOf(dd.type) === -1;
@@ -446,7 +454,8 @@ export class Entry {
446
454
  .map((dd) => {
447
455
  return {
448
456
  src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
449
- callback: () => { },
457
+ callback: () => {
458
+ },
450
459
  };
451
460
  }));
452
461
  function authPass() {
package/lowcode/Entry.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
- import { Glitter } from './glitterBundle/Glitter.js';
3
- import { config } from './config.js';
4
- import { ApiPageConfig } from './api/pageConfig.js';
5
- import { BaseApi } from './glitterBundle/api/base.js';
6
- import { GlobalUser } from './glitter-base/global/global-user.js';
7
- import { EditorConfig } from './editor-config.js';
8
- import { ShareDialog } from './glitterBundle/dialog/ShareDialog.js';
2
+ import {Glitter} from './glitterBundle/Glitter.js';
3
+ import {config} from './config.js';
4
+ import {ApiPageConfig} from './api/pageConfig.js';
5
+ import {BaseApi} from './glitterBundle/api/base.js';
6
+ import {GlobalUser} from './glitter-base/global/global-user.js';
7
+ import {EditorConfig} from './editor-config.js';
8
+ import {ShareDialog} from './glitterBundle/dialog/ShareDialog.js';
9
9
 
10
10
  export class Entry {
11
11
  public static onCreate(glitter: Glitter) {
@@ -46,7 +46,7 @@ export class Entry {
46
46
  glitter.page = (window as any).glitter_page;
47
47
  glitter.share.GlobalUser = GlobalUser;
48
48
 
49
- if(glitter.getUrlParameter('page')!=='backend_manager'){
49
+ if (glitter.getUrlParameter('page') !== 'backend_manager') {
50
50
  Entry.checkRedirectPage(glitter);
51
51
  }
52
52
 
@@ -71,7 +71,7 @@ export class Entry {
71
71
  }
72
72
  (window as any).renderClock = (window as any).renderClock ?? clockF();
73
73
  console.log(`Entry-time:`, (window as any).renderClock.stop());
74
- glitter.share.editerVersion = 'V_13.8.835';
74
+ glitter.share.editerVersion = 'V_13.8.836';
75
75
  glitter.share.start = new Date();
76
76
  const vm: {
77
77
  appConfig: any;
@@ -90,14 +90,14 @@ export class Entry {
90
90
  Entry.resourceInitial(glitter, vm, async (dd) => {
91
91
  glitter.addStyle(`
92
92
  ${
93
- parseInt((window.parent as any).glitter.share.bottom_inset, 10)
94
- ? `
93
+ parseInt((window.parent as any).glitter.share.bottom_inset, 10)
94
+ ? `
95
95
  .update-bar-container {
96
96
  padding-bottom: ${(window.parent as any).glitter.share.bottom_inset}px !important;
97
97
  }
98
98
  `
99
- : ``
100
- }
99
+ : ``
100
+ }
101
101
 
102
102
  .editorParent .editorChild {
103
103
  display: none;
@@ -178,9 +178,10 @@ export class Entry {
178
178
  await Entry.globalStyle(glitter, dd);
179
179
  if (glitter.getUrlParameter('type') === 'editor') {
180
180
  const dialog = new ShareDialog(glitter);
181
- dialog.dataLoading({ visible: true, text: '後台載入中' });
181
+ dialog.dataLoading({visible: true, text: '後台載入中'});
182
182
  // 頁面編輯器
183
- Entry.toBackendEditor(glitter, () => {});
183
+ Entry.toBackendEditor(glitter, () => {
184
+ });
184
185
  } else if (glitter.getUrlParameter('type') === 'htmlEditor') {
185
186
  // Iframe預覽區塊
186
187
  Entry.toHtmlEditor(glitter, vm, () => {
@@ -192,7 +193,9 @@ export class Entry {
192
193
  location.reload();
193
194
  } else {
194
195
  try {
195
-
196
+ glitter.addMtScript(['https://kit.fontawesome.com/cccedec0f8.js'], () => {
197
+ }, () => {
198
+ })
196
199
  const appList = (await ApiPageConfig.getAppList(undefined, GlobalUser.token)).response.result;
197
200
  localStorage.setItem('select_item', '0');
198
201
  if (appList.length === 0) {
@@ -376,8 +379,10 @@ export class Entry {
376
379
  src: 'https://kit.fontawesome.com/cccedec0f8.js',
377
380
  },
378
381
  ],
379
- () => {},
380
- () => {}
382
+ () => {
383
+ },
384
+ () => {
385
+ }
381
386
  );
382
387
  glitter.addStyle(`
383
388
  @media (prefers-reduced-motion: no-preference) {
@@ -418,9 +423,11 @@ export class Entry {
418
423
  type: 'module',
419
424
  };
420
425
  }),
421
- () => {},
422
- () => {},
423
- [{ key: 'async', value: 'true' }]
426
+ () => {
427
+ },
428
+ () => {
429
+ },
430
+ [{key: 'async', value: 'true'}]
424
431
  );
425
432
 
426
433
  // Preload page script
@@ -441,7 +448,7 @@ export class Entry {
441
448
  return eval(evals);
442
449
  };
443
450
  setTimeout(() => {
444
- (window.parent as any).glitter.share.loading_dialog.dataLoading({ text: '', visible: false });
451
+ (window.parent as any).glitter.share.loading_dialog.dataLoading({text: '', visible: false});
445
452
  }, 2000);
446
453
  glitter.htmlGenerate.setHome({
447
454
  app_config: vm.appConfig,
@@ -496,7 +503,8 @@ export class Entry {
496
503
  .map((dd: any) => {
497
504
  return {
498
505
  src: `${glitter.htmlGenerate.configureCDN(glitter.htmlGenerate.resourceHook(dd.js))}`,
499
- callback: () => {},
506
+ callback: () => {
507
+ },
500
508
  };
501
509
  })
502
510
  );
@@ -545,7 +553,7 @@ export class Entry {
545
553
  },
546
554
  {
547
555
  webFunction: () => {
548
- return { data: 0 };
556
+ return {data: 0};
549
557
  },
550
558
  }
551
559
  );
@@ -558,7 +566,7 @@ export class Entry {
558
566
  },
559
567
  {
560
568
  webFunction: () => {
561
- return { data: 0 };
569
+ return {data: 0};
562
570
  },
563
571
  }
564
572
  );
@@ -589,11 +597,11 @@ export class Entry {
589
597
  glitter.addStyle(`
590
598
  @charset "UTF-8";
591
599
  ${glitter.share.font_theme
592
- .map((dd: any) => {
593
- glitter.share.initial_fonts.push(dd.value);
594
- return `@import url('https://fonts.googleapis.com/css2?family=${dd.value}&display=swap');`;
595
- })
596
- .join('\n')}
600
+ .map((dd: any) => {
601
+ glitter.share.initial_fonts.push(dd.value);
602
+ return `@import url('https://fonts.googleapis.com/css2?family=${dd.value}&display=swap');`;
603
+ })
604
+ .join('\n')}
597
605
  body {
598
606
  font-family: '${glitter.share.font_theme[0].value}' !important;
599
607
  font-optical-sizing: auto;
@@ -727,7 +735,7 @@ export class Entry {
727
735
  // 判斷是否要重新定義頁面
728
736
  public static checkRedirectPage(glitter: Glitter) {
729
737
  const url = new URL(location.href);
730
- if (url.searchParams.get('state') === 'google_login' && glitter.getUrlParameter('page')!=='backend_manager') {
738
+ if (url.searchParams.get('state') === 'google_login' && glitter.getUrlParameter('page') !== 'backend_manager') {
731
739
  glitter.setUrlParameter('page', 'login');
732
740
  }
733
741
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "13.8.835",
3
+ "version": "13.8.836",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {