ts-glitter 20.7.2 → 20.7.4

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
@@ -144,7 +144,7 @@ export class Entry {
144
144
  }
145
145
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
146
146
  console.log(`Entry-time:`, window.renderClock.stop());
147
- glitter.share.editerVersion = 'V_20.7.2';
147
+ glitter.share.editerVersion = 'V_20.7.4';
148
148
  glitter.share.start = new Date();
149
149
  const vm = { appConfig: [] };
150
150
  window.saasConfig = {
package/lowcode/Entry.ts CHANGED
@@ -146,7 +146,7 @@ export class Entry {
146
146
  }
147
147
  (window as any).renderClock = (window as any).renderClock ?? createClock();
148
148
  console.log(`Entry-time:`, (window as any).renderClock.stop());
149
- glitter.share.editerVersion = 'V_20.7.2';
149
+ glitter.share.editerVersion = 'V_20.7.4';
150
150
  glitter.share.start = new Date();
151
151
  const vm = { appConfig: [] };
152
152
  (window as any).saasConfig = {
@@ -18,6 +18,7 @@ export class ThirdPartyGoggle {
18
18
  const vm = {
19
19
  loading: true,
20
20
  data: {
21
+ android_app_id: '',
21
22
  google_toggle: false,
22
23
  id: '',
23
24
  app_id: '',
@@ -29,12 +30,12 @@ export class ThirdPartyGoggle {
29
30
  g_tag: [],
30
31
  },
31
32
  };
32
- ApiUser.getPublicConfig(key, 'manager').then((dd) => {
33
+ ApiUser.getPublicConfig(key, 'manager').then(dd => {
33
34
  vm.loading = false;
34
35
  if (Object.keys(dd.response.value).length) {
35
36
  dd.response.value && (vm.data = dd.response.value);
36
37
  }
37
- ApiUser.getPublicConfig('ga4_config', 'manager').then((res) => {
38
+ ApiUser.getPublicConfig('ga4_config', 'manager').then(res => {
38
39
  if (Object.keys(res.response.value).length) {
39
40
  res.response.value && (vm.ga = res.response.value);
40
41
  }
@@ -52,17 +53,17 @@ export class ThirdPartyGoggle {
52
53
  return [
53
54
  array
54
55
  .map((dd, index) => {
55
- return html `<div
56
- class="col-12 col-sm-4 mb-2 ps-0"
57
- style="align-self: stretch;
56
+ return html ` <div
57
+ class="col-12 col-sm-4 mb-2 ps-0"
58
+ style="align-self: stretch;
58
59
  justify-content: flex-start;
59
60
  align-items: flex-start;
60
61
  gap: 0px;
61
62
  display: inline-flex;"
62
- >
63
- <input
64
- class="w-100"
65
- style="flex: 1 1 0;
63
+ >
64
+ <input
65
+ class="w-100"
66
+ style="flex: 1 1 0;
66
67
  height: 40px;
67
68
  padding: 9px 18px;
68
69
  overflow: hidden;
@@ -73,14 +74,14 @@ export class ThirdPartyGoggle {
73
74
  display: flex;
74
75
  border-right: 0px;
75
76
  border-radius: 10px 0px 0px 10px;"
76
- placeholder="請輸入編號"
77
- value="${dd.code}"
78
- onchange="${gvc.event((e, event) => {
77
+ placeholder="請輸入編號"
78
+ value="${dd.code}"
79
+ onchange="${gvc.event((e, event) => {
79
80
  dd.code = e.value;
80
81
  })}"
81
- />
82
- <div
83
- style="height: 100%;
82
+ />
83
+ <div
84
+ style="height: 100%;
84
85
  background: #f2f2f2;
85
86
  justify-content: center;
86
87
  align-items: center;
@@ -90,11 +91,11 @@ export class ThirdPartyGoggle {
90
91
  border-top-right-radius: 10px;
91
92
  border-bottom-right-radius: 10px;
92
93
  cursor: pointer;"
93
- onclick="${gvc.event(() => {
94
+ onclick="${gvc.event(() => {
94
95
  const dialog = new ShareDialog(gvc.glitter);
95
96
  dialog.checkYesOrNot({
96
97
  text: '是否確認刪除此追蹤編號?',
97
- callback: (response) => {
98
+ callback: response => {
98
99
  if (response) {
99
100
  array.splice(index, 1);
100
101
  gvc.notifyDataChange(id);
@@ -102,139 +103,160 @@ export class ThirdPartyGoggle {
102
103
  },
103
104
  });
104
105
  })}"
105
- >
106
- <div class="" style=""><i class="fa-regular fa-trash-can" aria-hidden="true"></i></div>
107
- </div>
108
- </div>`;
106
+ >
107
+ <div class="" style=""><i class="fa-regular fa-trash-can" aria-hidden="true"></i></div>
108
+ </div>
109
+ </div>`;
109
110
  })
110
111
  .join(''),
111
- html `<div
112
- class="col-12 col-sm-4 mb-2 ps-0"
113
- onclick="${gvc.event(() => {
112
+ html ` <div
113
+ class="col-12 col-sm-4 mb-2 ps-0"
114
+ onclick="${gvc.event(() => {
114
115
  array.push({ code: '' });
115
116
  gvc.notifyDataChange(id);
116
117
  })}"
117
- >
118
- <div class="bt_orange">新增編號</div>
119
- </div>`,
118
+ >
119
+ <div class="bt_orange">新增編號</div>
120
+ </div>`,
120
121
  ].join(``);
121
122
  }
122
123
  return [
123
- html `<div class="title-container">
124
- ${BgWidget.title('Google 串接設定')}
125
- <div class="flex-fill"></div>
126
- </div>`,
124
+ html ` <div class="title-container">
125
+ ${BgWidget.title('Google 串接設定')}
126
+ <div class="flex-fill"></div>
127
+ </div>`,
127
128
  BgWidget.mbContainer(18),
128
129
  BgWidget.container1x2({
129
130
  html: [
130
131
  BgWidget.mainCard([
131
- html `<div class="tx_700">串接綁定</div>`,
132
- html `<div class="d-flex align-items-center" style="gap:10px;">
133
- 啟用Google登入${BgWidget.switchButton(gvc, vm.data.google_toggle, () => {
132
+ html ` <div class="tx_700">串接綁定</div>`,
133
+ html ` <div class="d-flex align-items-center" style="gap:10px;">
134
+ 啟用Google登入${BgWidget.switchButton(gvc, vm.data.google_toggle, () => {
134
135
  vm.data.google_toggle = !vm.data.google_toggle;
135
136
  gvc.notifyDataChange(id);
136
137
  })}
137
- </div>`,
138
+ </div>`,
138
139
  BgWidget.editeInput({
139
140
  gvc: gvc,
140
- title: html `<div class="d-flex align-items-center" style="gap:10px;">客户端 ID</div>`,
141
+ title: html ` <div class="d-flex align-items-center" style="gap:10px;">客户端 ID</div>`,
141
142
  default: vm.data.id,
142
143
  placeHolder: '請前往GOOGLE開發者後台取得客户端 ID',
143
- callback: (text) => {
144
+ callback: text => {
144
145
  vm.data.id = text;
145
146
  },
146
147
  }),
147
148
  BgWidget.editeInput({
148
149
  gvc: gvc,
149
- title: html `<div class="d-flex align-items-center" style="gap:10px;">APP客户端 ID『 非必填 』</div>`,
150
+ title: html ` <div class="d-flex align-items-center" style="gap:10px;">
151
+ APP客户端 ID『 IOS應用程式 』
152
+ </div>`,
150
153
  default: vm.data.app_id,
151
154
  placeHolder: '請前往Google Cloud後台取得客户端 ID',
152
- callback: (text) => {
155
+ callback: text => {
153
156
  vm.data.app_id = text;
154
157
  },
155
158
  }),
156
159
  BgWidget.editeInput({
157
160
  gvc: gvc,
158
- title: html `<div class="d-flex align-items-center" style="gap:10px;">應用程式密鑰</div>`,
161
+ title: html ` <div class="d-flex align-items-center" style="gap:10px;">
162
+ APP客户端 ID『 Android應用程式 』
163
+ </div>`,
164
+ default: vm.data.android_app_id,
165
+ placeHolder: '請前往Google Cloud後台取得客户端 ID',
166
+ callback: text => {
167
+ vm.data.android_app_id = text;
168
+ },
169
+ }),
170
+ BgWidget.editeInput({
171
+ gvc: gvc,
172
+ title: html ` <div class="d-flex align-items-center" style="gap:10px;">應用程式密鑰</div>`,
159
173
  default: vm.data.secret,
160
174
  placeHolder: '請前往GOOGLE開發者後台取得應用程式密鑰',
161
- callback: (text) => {
175
+ callback: text => {
162
176
  vm.data.secret = text;
163
177
  },
164
178
  }),
165
- html `<div
166
- onclick="${gvc.event(() => {
179
+ html ` <div
180
+ onclick="${gvc.event(() => {
167
181
  const dialog = new ShareDialog(gvc.glitter);
168
182
  navigator.clipboard.writeText(`https://` + window.parent.glitter.share.editorViewModel.domain + '/login');
169
183
  dialog.successMessage({ text: '已複製至剪貼簿' });
170
184
  })}"
171
- >
172
- ${BgWidget.editeInput({
185
+ >
186
+ ${BgWidget.editeInput({
173
187
  readonly: true,
174
188
  gvc: gvc,
175
- title: html `<div class="d-flex flex-column" style="gap:5px;">
176
- 重新導向URI『 登入頁 』 ${BgWidget.grayNote('點擊複製此連結至Google Cloud後台的OAuth重定向URI')}
177
- </div>`,
189
+ title: html ` <div class="d-flex flex-column" style="gap:5px;">
190
+ 重新導向URI『 登入頁 』
191
+ ${BgWidget.grayNote('點擊複製此連結至Google Cloud後台的OAuth重定向URI')}
192
+ </div>`,
178
193
  default: `https://` + window.parent.glitter.share.editorViewModel.domain + '/login',
179
194
  placeHolder: '',
180
- callback: (text) => { },
195
+ callback: text => { },
181
196
  })}
182
- </div>`,
183
- html `<div
184
- onclick="${gvc.event(() => {
197
+ </div>`,
198
+ html ` <div
199
+ onclick="${gvc.event(() => {
185
200
  const dialog = new ShareDialog(gvc.glitter);
186
201
  navigator.clipboard.writeText(`https://` + window.parent.glitter.share.editorViewModel.domain + '/register');
187
202
  dialog.successMessage({ text: '已複製至剪貼簿' });
188
203
  })}"
189
- >
190
- ${BgWidget.editeInput({
204
+ >
205
+ ${BgWidget.editeInput({
191
206
  readonly: true,
192
207
  gvc: gvc,
193
- title: html `<div class="d-flex flex-column" style="gap:5px;">
194
- 重新導向URI『 註冊頁 』 ${BgWidget.grayNote('點擊複製此連結至Google Cloud後台的OAuth重定向URI')}
195
- </div>`,
208
+ title: html ` <div class="d-flex flex-column" style="gap:5px;">
209
+ 重新導向URI『 註冊頁 』
210
+ ${BgWidget.grayNote('點擊複製此連結至Google Cloud後台的OAuth重定向URI')}
211
+ </div>`,
196
212
  default: `https://` + window.parent.glitter.share.editorViewModel.domain + '/register',
197
213
  placeHolder: '',
198
- callback: (text) => { },
214
+ callback: text => { },
199
215
  })}
200
- </div>`,
216
+ </div>`,
201
217
  ].join(BgWidget.mbContainer(12))),
202
218
  BgWidget.mainCard([
203
- html `<div class="tx_700 d-flex align-items-center" style="gap:10px;">
204
- <img style="width: 25px;height: 25px;" src="https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1718208842472-ic_analytics.svg" />
205
- 資料分析 Google Analytics ( GA4 )
206
- </div>`,
207
- html `<div class="tx_700">追蹤編號</div>`,
208
- html `<div class="row m-0">${renderCodeSelect(vm.ga.ga4)}</div>`,
219
+ html ` <div class="tx_700 d-flex align-items-center" style="gap:10px;">
220
+ <img
221
+ style="width: 25px;height: 25px;"
222
+ src="https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1718208842472-ic_analytics.svg"
223
+ />
224
+ 資料分析 Google Analytics ( GA4 )
225
+ </div>`,
226
+ html ` <div class="tx_700">追蹤編號</div>`,
227
+ html ` <div class="row m-0">${renderCodeSelect(vm.ga.ga4)}</div>`,
209
228
  ].join(BgWidget.mbContainer(12))),
210
229
  BgWidget.mainCard([
211
- html `<div class="tx_700 d-flex align-items-center" style="gap:10px;">
212
- <img style="width: 25px;height: 25px;" src="https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1718210156723-ic_tag_manager.svg" />
213
- 追蹤代碼管理工具 Google Tag Manager
214
- </div>`,
215
- html `<div class="tx_700">追蹤編號含GTM</div>`,
216
- html `<div class="row m-0">${renderCodeSelect(vm.ga.g_tag)}</div>`,
230
+ html ` <div class="tx_700 d-flex align-items-center" style="gap:10px;">
231
+ <img
232
+ style="width: 25px;height: 25px;"
233
+ src="https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1718210156723-ic_tag_manager.svg"
234
+ />
235
+ 追蹤代碼管理工具 Google Tag Manager
236
+ </div>`,
237
+ html ` <div class="tx_700">追蹤編號含GTM</div>`,
238
+ html ` <div class="row m-0">${renderCodeSelect(vm.ga.g_tag)}</div>`,
217
239
  ].join(BgWidget.mbContainer(12))),
218
240
  ].join(BgWidget.mbContainer(24)),
219
241
  ratio: 70,
220
242
  }, {
221
243
  html: [
222
244
  BgWidget.summaryCard([
223
- html `<div class="tx_700">操作說明</div>`,
224
- html `<div class="tx_normal">設定Google串接,實現Google登入,與 GA4 用戶行為追蹤</div>`,
225
- html `<div class="tx_normal">
226
- 前往
227
- ${BgWidget.blueNote(`『 教學步驟 』`, gvc.event(() => {
245
+ html ` <div class="tx_700">操作說明</div>`,
246
+ html ` <div class="tx_normal">設定Google串接,實現Google登入,與 GA4 用戶行為追蹤</div>`,
247
+ html ` <div class="tx_normal">
248
+ 前往
249
+ ${BgWidget.blueNote(`『 教學步驟 』`, gvc.event(() => {
228
250
  window.parent.glitter.openNewTab('https://shopnex.tw/blogs/googleapiconnect');
229
251
  }))}
230
- 查看串接設定流程
231
- </div>`,
252
+ 查看串接設定流程
253
+ </div>`,
232
254
  ].join(BgWidget.mbContainer(12))),
233
255
  ].join(BgWidget.mbContainer(24)),
234
256
  ratio: 30,
235
257
  }),
236
- html `<div class="update-bar-container">
237
- ${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
258
+ html ` <div class="update-bar-container">
259
+ ${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
238
260
  const dialog = new ShareDialog(gvc.glitter);
239
261
  dialog.dataLoading({ visible: true });
240
262
  const cf = (yield ApiUser.getPublicConfig('login_config', 'manager')).response.value || {};
@@ -259,7 +281,7 @@ export class ThirdPartyGoggle {
259
281
  gvc.closeDialog();
260
282
  });
261
283
  })))}
262
- </div>`,
284
+ </div>`,
263
285
  ].join('');
264
286
  },
265
287
  };