ts-glitter 13.8.833 → 13.8.835

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.833';
73
+ glitter.share.editerVersion = 'V_13.8.835';
74
74
  glitter.share.start = new Date();
75
75
  const vm = {
76
76
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -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.833';
74
+ glitter.share.editerVersion = 'V_13.8.835';
75
75
  glitter.share.start = new Date();
76
76
  const vm: {
77
77
  appConfig: any;
@@ -0,0 +1,122 @@
1
+ const html = String.raw;
2
+ export class BgMobileGuide {
3
+ constructor(gvc, guide, type = 'backend-manger', step = 0) {
4
+ this.stepInf = [
5
+ {
6
+ title: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_s8sds2s0s2s6s0s8_%E5%AE%98%E7%B6%B2%E8%A8%AD%E8%A8%88.png`,
7
+ img: "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_s7s9s8s9s5s7sbs5_Frame1368228026.png",
8
+ description: "在首頁點擊「品牌官網」後,系統將導向佈景主題頁面,您可以在此編輯與管理官網樣式。",
9
+ }, {
10
+ title: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_sfs0s0s4s5s7sds6_AI%E5%8A%A9%E6%89%8B.png`,
11
+ img: "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_sesds2s9s4s1s8sf_Frame1368228028.png",
12
+ description: "點擊上方「AI助手」即開啟對話視窗,享訂單分析、操作引導等功能,助您高效經營!",
13
+ }, {
14
+ title: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_s0s4sbs2sfsdses2_%E5%95%86%E5%93%81%E4%B8%8A%E6%9E%B6.png`,
15
+ img: "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_sbs9s4sas2s6sese_Frame1368228024.png",
16
+ description: "展開左側導覽,點擊「商品管理」下的「商品列表」,即可前往上架商品的頁面。",
17
+ }, {
18
+ title: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_s8s3s7s8s6sds4s0_%E8%A8%82%E5%96%AE%E7%AE%A1%E7%90%86.png`,
19
+ img: "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_sas6sds5s2scs7s4_Frame1368228025.png",
20
+ description: "展開左側導覽,點擊「訂單管理」下的「訂單列表」,即可輕鬆查看並處理訂單。",
21
+ },
22
+ ];
23
+ this.eventSet = [];
24
+ this.guide = guide;
25
+ this.gvc = gvc;
26
+ this.type = type;
27
+ this.step = step;
28
+ }
29
+ closeBG() {
30
+ const element = document.querySelector('.guide-BG');
31
+ element.remove();
32
+ }
33
+ drawBG() {
34
+ this.gvc.addStyle(`
35
+ .swiper-pagination-bullet{
36
+ width: 10px!important;
37
+ height: 10px;
38
+ border-radius: 20px;
39
+ background: #DDD;
40
+ }
41
+ .swiper-pagination-bullet,.swiper-pagination-bullet-active{
42
+ background: #393939!important;
43
+ }
44
+ `);
45
+ let body = document.querySelector('.editorContainer');
46
+ if (body && !document.querySelector('.guide-BG')) {
47
+ let appendHTML = html `
48
+ <div
49
+ class="guide-BG d-flex align-items-center justify-content-center"
50
+ style="width:100vw;height: 100vh; background: rgba(0, 0, 0, 0.60);position: absolute;left: 0;top: 0;z-index:1031;"
51
+ onclick="${this.gvc.event(() => {
52
+ })}"
53
+ >
54
+ <div class="d-flex flex-column align-items-center justify-content-center" style="position: relative;height: 100vh;width: 100%;background-color: white;padding-bottom: 70px;">
55
+ <div class="swiper d-flex " style="width: 100vw;background-color: white;padding-bottom: 20px;position: relative">
56
+ <div class="swiper-wrapper flex-fill w-100" style="padding-bottom: 35px">
57
+ ${(() => {
58
+ return this.stepInf.map((inf) => {
59
+ return html `
60
+ <div class="swiper-slide w-100" style="">
61
+ <div class="w-100 d-flex align-items-center justify-content-center">
62
+ <img style="width:209px;height: 62px;" src="${inf.title}" alt="">
63
+ </div>
64
+
65
+ <div class="w-100 align-items-center justify-content-center" style="margin-top: 25px;">
66
+ <img src="${inf.img}" alt="">
67
+ </div>
68
+ <div class="d-flex align-items-center justify-content-center w-100" style="margin-top: 26px;white-space:normal;padding: 0 30px;">
69
+ ${inf.description}
70
+ </div>
71
+ </div>`;
72
+ }).join('');
73
+ })()}
74
+ </div>
75
+ <!-- If we need pagination -->
76
+ <div class="swiper-pagination" style=""></div>
77
+ </div>
78
+ <div class="d-flex w-100" style="padding: 0 30px;position: absolute;left:0;bottom: 30px;">
79
+ <div class="d-flex align-items-center justify-content-center w-100" style="padding: 10px 20px;;z-index: 2;border-radius: 6px;border: 1px solid #DDD;" onclick="${this.gvc.event(() => {
80
+ this.closeBG();
81
+ })}">
82
+ 直接開始
83
+ </div>
84
+ </div>
85
+
86
+ </div>
87
+ </div>
88
+ `;
89
+ $(body).append(appendHTML);
90
+ }
91
+ const swiper = new window.Swiper('.swiper', {
92
+ loop: true,
93
+ pagination: {
94
+ el: '.swiper-pagination',
95
+ },
96
+ on: {
97
+ slideChange: function () {
98
+ console.log('當前頁面索引:', this.activeIndex);
99
+ },
100
+ },
101
+ });
102
+ return html ``;
103
+ }
104
+ drawGuide() {
105
+ if (document.body.clientWidth >= 922) {
106
+ return;
107
+ }
108
+ const that = this;
109
+ const timer = setInterval(function () {
110
+ if (document.querySelector('iframe')) {
111
+ that.gvc.glitter.addStyleLink([
112
+ 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css',
113
+ ]);
114
+ that.drawBG();
115
+ clearInterval(timer);
116
+ }
117
+ }, 500);
118
+ return html ``;
119
+ }
120
+ }
121
+ BgMobileGuide.disableFunction = () => {
122
+ };
@@ -0,0 +1,149 @@
1
+ import {GVC} from '../glitterBundle/GVController.js';
2
+
3
+ const html = String.raw;
4
+
5
+ export class BgMobileGuide {
6
+ public guide: number;
7
+ public step: number;
8
+ public type: string;
9
+ public gvc: GVC;
10
+ private stepInf: {
11
+ title: string,
12
+ img: string,
13
+ description: string,
14
+ }[] = [
15
+ {
16
+ title:`https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_s8sds2s0s2s6s0s8_%E5%AE%98%E7%B6%B2%E8%A8%AD%E8%A8%88.png`,
17
+ img: "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_s7s9s8s9s5s7sbs5_Frame1368228026.png",
18
+ description: "在首頁點擊「品牌官網」後,系統將導向佈景主題頁面,您可以在此編輯與管理官網樣式。",
19
+ }, {
20
+ title: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_sfs0s0s4s5s7sds6_AI%E5%8A%A9%E6%89%8B.png`,
21
+ img: "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_sesds2s9s4s1s8sf_Frame1368228028.png",
22
+ description: "點擊上方「AI助手」即開啟對話視窗,享訂單分析、操作引導等功能,助您高效經營!",
23
+ }, {
24
+ title: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_s0s4sbs2sfsdses2_%E5%95%86%E5%93%81%E4%B8%8A%E6%9E%B6.png`,
25
+
26
+ img: "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_sbs9s4sas2s6sese_Frame1368228024.png",
27
+ description: "展開左側導覽,點擊「商品管理」下的「商品列表」,即可前往上架商品的頁面。",
28
+ }, {
29
+ title: `https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_s8s3s7s8s6sds4s0_%E8%A8%82%E5%96%AE%E7%AE%A1%E7%90%86.png`,
30
+ img: "https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/size1440_s*px$_sas6sds5s2scs7s4_Frame1368228025.png",
31
+ description: "展開左側導覽,點擊「訂單管理」下的「訂單列表」,即可輕鬆查看並處理訂單。",
32
+ },
33
+ ]
34
+ private eventSet: any = [];
35
+
36
+ public static disableFunction: any = () => {
37
+ }
38
+
39
+
40
+ constructor(gvc: GVC, guide: number, type: string = 'backend-manger', step: number = 0) {
41
+ this.guide = guide;
42
+ this.gvc = gvc;
43
+ this.type = type;
44
+ this.step = step;
45
+ }
46
+
47
+ private closeBG(){
48
+ const element = document.querySelector('.guide-BG');
49
+ element!.remove();
50
+ }
51
+ public drawBG() {
52
+ this.gvc.addStyle(`
53
+ .swiper-pagination-bullet{
54
+ width: 10px!important;
55
+ height: 10px;
56
+ border-radius: 20px;
57
+ background: #DDD;
58
+ }
59
+ .swiper-pagination-bullet,.swiper-pagination-bullet-active{
60
+ background: #393939!important;
61
+ }
62
+ `)
63
+ let body = document.querySelector('.editorContainer');
64
+ if (body && !document.querySelector('.guide-BG')) {
65
+ let appendHTML = html`
66
+ <div
67
+ class="guide-BG d-flex align-items-center justify-content-center"
68
+ style="width:100vw;height: 100vh; background: rgba(0, 0, 0, 0.60);position: absolute;left: 0;top: 0;z-index:1031;"
69
+ onclick="${this.gvc.event(() => {
70
+ })}"
71
+ >
72
+ <div class="d-flex flex-column align-items-center justify-content-center" style="position: relative;height: 100vh;width: 100%;background-color: white;padding-bottom: 70px;">
73
+ <div class="swiper d-flex " style="width: 100vw;background-color: white;padding-bottom: 20px;position: relative">
74
+ <div class="swiper-wrapper flex-fill w-100" style="padding-bottom: 35px">
75
+ ${(() => {
76
+ return this.stepInf.map((inf) => {
77
+ return html`
78
+ <div class="swiper-slide w-100" style="">
79
+ <div class="w-100 d-flex align-items-center justify-content-center">
80
+ <img style="width:209px;height: 62px;" src="${inf.title}" alt="">
81
+ </div>
82
+
83
+ <div class="w-100 align-items-center justify-content-center" style="margin-top: 25px;">
84
+ <img src="${inf.img}" alt="">
85
+ </div>
86
+ <div class="d-flex align-items-center justify-content-center w-100" style="margin-top: 26px;white-space:normal;padding: 0 30px;">
87
+ ${inf.description}
88
+ </div>
89
+ </div>`
90
+ }).join('');
91
+ })()}
92
+ </div>
93
+ <!-- If we need pagination -->
94
+ <div class="swiper-pagination" style=""></div>
95
+ </div>
96
+ <div class="d-flex w-100" style="padding: 0 30px;position: absolute;left:0;bottom: 30px;">
97
+ <div class="d-flex align-items-center justify-content-center w-100" style="padding: 10px 20px;;z-index: 2;border-radius: 6px;border: 1px solid #DDD;" onclick="${this.gvc.event(()=>{
98
+ this.closeBG();
99
+ })}">
100
+ 直接開始
101
+ </div>
102
+ </div>
103
+
104
+ </div>
105
+ </div>
106
+ `;
107
+ $(body).append(appendHTML);
108
+
109
+ }
110
+ const swiper = new (window as any).Swiper('.swiper', {
111
+ // Optional parameters
112
+ loop: true,
113
+ // If we need pagination
114
+ pagination: {
115
+ el: '.swiper-pagination',
116
+ },
117
+ on: {
118
+ slideChange: function () {
119
+ // @ts-ignore
120
+ console.log('當前頁面索引:', this.activeIndex);
121
+ },
122
+ },
123
+
124
+ });
125
+
126
+ return html``;
127
+ }
128
+
129
+ public drawGuide() {
130
+ if (document.body.clientWidth >= 922) {
131
+ return
132
+ }
133
+
134
+ const that = this;
135
+ const timer = setInterval(function () {
136
+ if (document.querySelector('iframe')) {
137
+ // running().then(r => {
138
+ //
139
+ // })
140
+ that.gvc.glitter.addStyleLink([
141
+ 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css',
142
+ ]);
143
+ that.drawBG();
144
+ clearInterval(timer);
145
+ }
146
+ }, 500);
147
+ return html``;
148
+ }
149
+ }
@@ -39,6 +39,7 @@ import { BaseApi } from "../glitterBundle/api/base.js";
39
39
  import { GlobalUser } from "../glitter-base/global/global-user.js";
40
40
  import { Article } from "../glitter-base/route/article.js";
41
41
  import { AiChat } from "../glitter-base/route/ai-chat.js";
42
+ import { BgMobileGuide } from "../backend-manager/bg-mobile-guide.js";
42
43
  const html = String.raw;
43
44
  const editorContainerID = `HtmlEditorContainer`;
44
45
  init(import.meta.url, (gvc, glitter, gBundle) => {
@@ -691,6 +692,11 @@ ${Storage.page_setting_item === `${da.index}` ? `background:${EditorConfig.edito
691
692
  });
692
693
  }
693
694
  else {
695
+ if (!localStorage.getItem('see_bg_mobile_guide')) {
696
+ let bgMobileGuide = new BgMobileGuide(gvc, 1);
697
+ bgMobileGuide.drawGuide();
698
+ localStorage.setItem('see_bg_mobile_guide', 'true');
699
+ }
694
700
  }
695
701
  break;
696
702
  }
@@ -30,6 +30,7 @@ import {BaseApi} from "../glitterBundle/api/base.js";
30
30
  import {GlobalUser} from "../glitter-base/global/global-user.js";
31
31
  import {Article} from "../glitter-base/route/article.js";
32
32
  import {AiChat} from "../glitter-base/route/ai-chat.js";
33
+ import {BgMobileGuide} from "../backend-manager/bg-mobile-guide.js";
33
34
 
34
35
  const html = String.raw;
35
36
  //
@@ -744,7 +745,12 @@ ${Storage.page_setting_item === `${da.index}` ? `background:${EditorConfig.edito
744
745
  }
745
746
  })
746
747
  }else {
747
- // bgMobileGuide.drawGuide();
748
+ if(!localStorage.getItem('see_bg_mobile_guide')){
749
+ let bgMobileGuide = new BgMobileGuide(gvc,1);
750
+ bgMobileGuide.drawGuide();
751
+ localStorage.setItem('see_bg_mobile_guide','true')
752
+ }
753
+
748
754
  }
749
755
  break
750
756
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "13.8.833",
3
+ "version": "13.8.835",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {