ts-glitter 14.4.6 → 14.4.7

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_14.4.6';
73
+ glitter.share.editerVersion = 'V_14.4.7';
74
74
  glitter.share.start = new Date();
75
75
  const vm = {
76
76
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -73,7 +73,7 @@ export class Entry {
73
73
  }
74
74
  (window as any).renderClock = (window as any).renderClock ?? clockF();
75
75
  console.log(`Entry-time:`, (window as any).renderClock.stop());
76
- glitter.share.editerVersion = 'V_14.4.6';
76
+ glitter.share.editerVersion = 'V_14.4.7';
77
77
  glitter.share.start = new Date();
78
78
  const vm: {
79
79
  appConfig: any;
@@ -8,7 +8,8 @@ export class Footer01 {
8
8
  const footer = {
9
9
  list: [],
10
10
  };
11
- gvc.addStyle(`
11
+ const css = String.raw;
12
+ gvc.addStyle(css `
12
13
  .f-title {
13
14
  font-size: 16px;
14
15
  font-weight: 600;
@@ -35,10 +36,6 @@ export class Footer01 {
35
36
  background: ${colors.bgr};
36
37
  }
37
38
 
38
- .f-padding-top {
39
- padding-top: 38px;
40
- }
41
-
42
39
  .f-container {
43
40
  margin-left: 10px;
44
41
  margin-right: 10px;
@@ -46,7 +43,6 @@ export class Footer01 {
46
43
 
47
44
  .f-title-container {
48
45
  margin-bottom: 18px;
49
- padding-right: 192px;
50
46
  }
51
47
 
52
48
  .f-content-container {
@@ -62,6 +58,36 @@ export class Footer01 {
62
58
  padding: 6px 0;
63
59
  }
64
60
 
61
+ .f-icon-div {
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ cursor: pointer;
66
+ }
67
+
68
+ .f-icon-image {
69
+ color: #ffffff;
70
+ width: 30px;
71
+ height: 30px;
72
+ }
73
+
74
+ .f-intro {
75
+ margin-top: 12px;
76
+ font-size: 14px;
77
+ font-weight: 400;
78
+ line-height: 160%;
79
+ letter-spacing: 0.56px;
80
+ color: ${colors.content};
81
+ }
82
+ `);
83
+ gvc.addStyle(css `
84
+ .f-copyright {
85
+ font-size: 14px;
86
+ color: ${colors.content};
87
+ border-top: 1px solid ${colors.content};
88
+ padding: 6px 0;
89
+ }
90
+
65
91
  .f-h4 {
66
92
  color: ${colors.title};
67
93
  font-size: 32px;
@@ -79,40 +105,49 @@ export class Footer01 {
79
105
  color: ${colors.content};
80
106
  }
81
107
  `);
82
- return html ` <footer class="f-bgr border-top">
83
- <div class="border-gray-700 f-padding-top">
84
- <div class="container">
85
- <div class="row py-sm-5 f-container">
86
- <div class="col-12 col-md-3 col-lg-4 f-title-container">
87
- <img src="${formData.logo}" style="max-height: 90px" />
88
- <ul class="d-flex list-unstyled list-inline mt-3 mb-md-0 text-gray-350">
89
- ${(() => {
108
+ console.log();
109
+ return html `
110
+ <footer class="f-bgr border-top">
111
+ <div class="border-gray-700 f-padding-top">
112
+ <div class="container">
113
+ <div class="row py-sm-5 f-container ">
114
+ <div class="col-12 col-md-3 col-lg-4 f-title-container pt-3 pt-sm-0 ${document.body.clientWidth < 800 ? ` d-flex flex-column align-items-center justify-content-center` : ``}">
115
+ <img src="${formData.logo}" style="max-height: 90px"/>
116
+ <ul class="d-flex list-unstyled list-inline mt-3 mb-md-0 text-gray-350">
117
+ ${(() => {
90
118
  try {
91
119
  return formData.kkk.link
92
120
  .map((item) => {
93
- return html ` <li class="list-inline-item f-icon-list">
94
- <div
95
- class="text-reset"
96
- onclick="${gvc.event(() => {
121
+ return html `
122
+ <li class="list-inline-item f-icon-list">
123
+ <div class="f-icon-div">
124
+ <div
125
+ onclick="${gvc.event(() => {
97
126
  gvc.glitter.href = item.link;
98
127
  })}"
99
- >
100
- ${(() => {
128
+ >
129
+ <img
130
+ class="f-icon-image"
131
+ src="${(() => {
101
132
  switch (item.type) {
102
133
  case 'fb':
103
- return html `<i class="fab fa-facebook-f f-icon"></i>`;
134
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847285395-img_facebook.svg';
104
135
  case 'youtube':
105
- return html `<i class="fab fa-youtube f-icon"></i>`;
136
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847654029-771382_channel_circle_logo_media_social_icon.png';
106
137
  case 'twitter':
107
- return html `<i class="fab fa-twitter f-icon"></i>`;
138
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847853494-m2i8K9K9N4b1G6H7.png';
108
139
  case 'ig':
109
- return html `<i class="fab fa-instagram f-icon"></i>`;
140
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847430108-social.png';
141
+ case 'line':
142
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847342584-img_line.svg';
110
143
  default:
111
144
  return '';
112
145
  }
113
- })()}
114
- </div>
115
- </li>`;
146
+ })()}"
147
+ />
148
+ </div>
149
+ </div>
150
+ </li>`;
116
151
  })
117
152
  .join('');
118
153
  }
@@ -120,10 +155,15 @@ export class Footer01 {
120
155
  return '';
121
156
  }
122
157
  })()}
123
- </ul>
124
- </div>
125
- <div class="col f-content-container ${document.body.clientWidth > 768 ? '' : 'row'}">
126
- ${(() => {
158
+ </ul>
159
+ <div>
160
+ <h4 class="f-intro mb-0">
161
+ ${formData.intro ? formData.intro.replace(/\n/g, '<br/>') : ''}</h4>
162
+ </div>
163
+ </div>
164
+
165
+ <div class="col f-content-container ${document.body.clientWidth > 768 ? '' : 'row'}">
166
+ ${(() => {
127
167
  try {
128
168
  return gvc.bindView((() => {
129
169
  const id = gvc.glitter.getUUID();
@@ -137,41 +177,43 @@ export class Footer01 {
137
177
  else {
138
178
  return footer.list
139
179
  .map((data) => {
140
- return html ` <div class="${document.body.clientWidth > 768 ? '' : 'col-12 mt-2cs'}">
141
- <h6
142
- class="heading-xxs mb-3 f-title"
143
- onclick="${gvc.event(() => {
180
+ return html `
181
+ <div class="${document.body.clientWidth > 768 ? '' : 'col-12 mt-3'}">
182
+ <h6
183
+ class="heading-xxs mb-3 f-title"
184
+ onclick="${gvc.event(() => {
144
185
  if (data.link) {
145
186
  gvc.glitter.href = data.link;
146
187
  }
147
188
  })}"
148
- >
149
- ${data.title}
150
- </h6>
151
- <ul class="list-unstyled mb-7 f-ul">
152
- ${data.items
189
+ >
190
+ ${data.title}
191
+ </h6>
192
+ <ul class="list-unstyled mb-7 f-ul">
193
+ ${data.items
153
194
  .map((chi) => {
154
- return html ` <li
155
- class="f-li"
156
- style="${chi.link ? 'cursor: pointer;' : ''}"
157
- onclick="${gvc.event(() => {
195
+ return html `
196
+ <li
197
+ class="f-li"
198
+ style="${chi.link ? 'cursor: pointer;' : ''}"
199
+ onclick="${gvc.event(() => {
158
200
  if (chi.link) {
159
201
  gvc.glitter.href = chi.link;
160
202
  }
161
203
  })}"
162
- >
163
- <a class="f-aclass">${chi.title}</a>
164
- </li>`;
204
+ >
205
+ <a class="f-aclass">${chi.title}</a>
206
+ </li>`;
165
207
  })
166
208
  .join('')}
167
- </ul>
168
- </div>`;
209
+ </ul>
210
+ </div>`;
169
211
  })
170
212
  .join('');
171
213
  }
172
214
  },
173
215
  divCreate: {
174
- class: document.body.clientWidth > 768 ? 'd-flex gap-5' : '',
216
+ class: document.body.clientWidth > 768 ? 'd-flex gap-5' : 'row p-0',
175
217
  },
176
218
  onCreate: () => {
177
219
  if (loading) {
@@ -191,26 +233,24 @@ export class Footer01 {
191
233
  return '';
192
234
  }
193
235
  })()}
236
+ </div>
194
237
  </div>
195
238
  </div>
196
239
  </div>
197
- </div>
198
- <div class="py-6">
199
- <div class="container">
240
+ <div class="py-6">
241
+ <div class="container">
242
+ ${(formData.copy_right) ? `
200
243
  <div class="row">
201
244
  <div class="col text-center">
202
245
  <p class="my-2 f-copyright">
203
- ${(() => {
204
- const currentDate = new Date();
205
- const currentYear = currentDate.getFullYear();
206
- return `${currentYear} © ${formData.logo} , LTD. ALL RIGHTS RESERVED.`;
207
- })()}
246
+ ${formData.copy_right}
208
247
  </p>
209
248
  </div>
249
+ </div>` : ``}
250
+
210
251
  </div>
211
252
  </div>
212
- </div>
213
- </footer>`;
253
+ </footer>`;
214
254
  }
215
255
  }
216
256
  window.glitter.setModule(import.meta.url, Footer01);
@@ -1,6 +1,6 @@
1
- import { GVC } from '../../glitterBundle/GVController.js';
2
- import { FtClass } from './ft-class.js';
3
- import { ApiUser } from '../../glitter-base/route/user.js';
1
+ import {GVC} from '../../glitterBundle/GVController.js';
2
+ import {FtClass} from './ft-class.js';
3
+ import {ApiUser} from '../../glitter-base/route/user.js';
4
4
 
5
5
  const html = String.raw;
6
6
 
@@ -22,8 +22,8 @@ export class Footer01 {
22
22
  const footer = {
23
23
  list: [],
24
24
  };
25
-
26
- gvc.addStyle(`
25
+ const css = String.raw
26
+ gvc.addStyle(css`
27
27
  .f-title {
28
28
  font-size: 16px;
29
29
  font-weight: 600;
@@ -50,10 +50,6 @@ export class Footer01 {
50
50
  background: ${colors.bgr};
51
51
  }
52
52
 
53
- .f-padding-top {
54
- padding-top: 38px;
55
- }
56
-
57
53
  .f-container {
58
54
  margin-left: 10px;
59
55
  margin-right: 10px;
@@ -61,7 +57,6 @@ export class Footer01 {
61
57
 
62
58
  .f-title-container {
63
59
  margin-bottom: 18px;
64
- padding-right: 192px;
65
60
  }
66
61
 
67
62
  .f-content-container {
@@ -77,6 +72,36 @@ export class Footer01 {
77
72
  padding: 6px 0;
78
73
  }
79
74
 
75
+ .f-icon-div {
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ cursor: pointer;
80
+ }
81
+
82
+ .f-icon-image {
83
+ color: #ffffff;
84
+ width: 30px;
85
+ height: 30px;
86
+ }
87
+
88
+ .f-intro {
89
+ margin-top: 12px;
90
+ font-size: 14px;
91
+ font-weight: 400;
92
+ line-height: 160%;
93
+ letter-spacing: 0.56px;
94
+ color: ${colors.content};
95
+ }
96
+ `)
97
+ gvc.addStyle(css`
98
+ .f-copyright {
99
+ font-size: 14px;
100
+ color: ${colors.content};
101
+ border-top: 1px solid ${colors.content};
102
+ padding: 6px 0;
103
+ }
104
+
80
105
  .f-h4 {
81
106
  color: ${colors.title};
82
107
  font-size: 32px;
@@ -94,138 +119,151 @@ export class Footer01 {
94
119
  color: ${colors.content};
95
120
  }
96
121
  `);
122
+ console.log()
123
+ return html`
124
+ <footer class="f-bgr border-top">
125
+ <div class="border-gray-700 f-padding-top">
126
+ <div class="container">
127
+ <div class="row py-sm-5 f-container ">
128
+ <div class="col-12 col-md-3 col-lg-4 f-title-container pt-3 pt-sm-0 ${document.body.clientWidth<800 ? ` d-flex flex-column align-items-center justify-content-center`:``}">
129
+ <img src="${formData.logo}" style="max-height: 90px"/>
130
+ <ul class="d-flex list-unstyled list-inline mt-3 mb-md-0 text-gray-350">
131
+ ${(() => {
132
+ try {
133
+ return formData.kkk.link
134
+ .map((item: { link: string; type: string }) => {
135
+ return html`
136
+ <li class="list-inline-item f-icon-list">
137
+ <div class="f-icon-div">
138
+ <div
139
+ onclick="${gvc.event(() => {
140
+ gvc.glitter.href = item.link;
141
+ })}"
142
+ >
143
+ <img
144
+ class="f-icon-image"
145
+ src="${(() => {
146
+ switch (item.type) {
147
+ case 'fb':
148
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847285395-img_facebook.svg';
149
+ case 'youtube':
150
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847654029-771382_channel_circle_logo_media_social_icon.png';
151
+ case 'twitter':
152
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847853494-m2i8K9K9N4b1G6H7.png';
153
+ case 'ig':
154
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847430108-social.png';
155
+ case 'line':
156
+ return 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722847342584-img_line.svg';
157
+ default:
158
+ return '';
159
+ }
160
+ })()}"
161
+ />
162
+ </div>
163
+ </div>
164
+ </li>`;
165
+ })
166
+ .join('');
167
+ } catch (error) {
168
+ return '';
169
+ }
170
+ })()}
171
+ </ul>
172
+ <div>
173
+ <h4 class="f-intro mb-0">
174
+ ${formData.intro ? formData.intro.replace(/\n/g, '<br/>') : ''}</h4>
175
+ </div>
176
+ </div>
97
177
 
98
- return html` <footer class="f-bgr border-top">
99
- <div class="border-gray-700 f-padding-top">
100
- <div class="container">
101
- <div class="row py-sm-5 f-container">
102
- <div class="col-12 col-md-3 col-lg-4 f-title-container">
103
- <img src="${formData.logo}" style="max-height: 90px" />
104
- <ul class="d-flex list-unstyled list-inline mt-3 mb-md-0 text-gray-350">
178
+ <div class="col f-content-container ${document.body.clientWidth > 768 ? '' : 'row'}">
105
179
  ${(() => {
106
180
  try {
107
- return formData.kkk.link
108
- .map((item: { link: string; type: string }) => {
109
- return html` <li class="list-inline-item f-icon-list">
110
- <div
111
- class="text-reset"
112
- onclick="${gvc.event(() => {
113
- gvc.glitter.href = item.link;
114
- })}"
115
- >
116
- ${(() => {
117
- switch (item.type) {
118
- case 'fb':
119
- return html`<i class="fab fa-facebook-f f-icon"></i>`;
120
- case 'youtube':
121
- return html`<i class="fab fa-youtube f-icon"></i>`;
122
- case 'twitter':
123
- return html`<i class="fab fa-twitter f-icon"></i>`;
124
- case 'ig':
125
- return html`<i class="fab fa-instagram f-icon"></i>`;
126
- default:
127
- return '';
181
+ return gvc.bindView(
182
+ (() => {
183
+ const id = gvc.glitter.getUUID();
184
+ let loading = true;
185
+ return {
186
+ bind: id,
187
+ view: () => {
188
+ if (loading) {
189
+ return '';
190
+ } else {
191
+ return footer.list
192
+ .map((data: FooterItem) => {
193
+ return html`
194
+ <div class="${document.body.clientWidth > 768 ? '' : 'col-12 mt-3'}">
195
+ <h6
196
+ class="heading-xxs mb-3 f-title"
197
+ onclick="${gvc.event(() => {
198
+ if (data.link) {
199
+ gvc.glitter.href = data.link;
200
+ }
201
+ })}"
202
+ >
203
+ ${data.title}
204
+ </h6>
205
+ <ul class="list-unstyled mb-7 f-ul">
206
+ ${data.items
207
+ .map((chi) => {
208
+ return html`
209
+ <li
210
+ class="f-li"
211
+ style="${chi.link ? 'cursor: pointer;' : ''}"
212
+ onclick="${gvc.event(() => {
213
+ if (chi.link) {
214
+ gvc.glitter.href = chi.link;
215
+ }
216
+ })}"
217
+ >
218
+ <a class="f-aclass">${chi.title}</a>
219
+ </li>`;
220
+ })
221
+ .join('')}
222
+ </ul>
223
+ </div>`;
224
+ })
225
+ .join('');
128
226
  }
129
- })()}
130
- </div>
131
- </li>`;
132
- })
133
- .join('');
227
+ },
228
+ divCreate: {
229
+ class: document.body.clientWidth > 768 ? 'd-flex gap-5' : 'row p-0',
230
+ },
231
+ onCreate: () => {
232
+ if (loading) {
233
+ ApiUser.getPublicConfig('footer-setting', 'manager').then((data) => {
234
+ if (data.result && data.response.value) {
235
+ footer.list = data.response.value;
236
+ }
237
+ loading = false;
238
+ gvc.notifyDataChange(id);
239
+ });
240
+ }
241
+ },
242
+ };
243
+ })()
244
+ );
134
245
  } catch (error) {
135
246
  return '';
136
247
  }
137
248
  })()}
138
- </ul>
139
- </div>
140
- <div class="col f-content-container ${document.body.clientWidth > 768 ? '' : 'row'}">
141
- ${(() => {
142
- try {
143
- return gvc.bindView(
144
- (() => {
145
- const id = gvc.glitter.getUUID();
146
- let loading = true;
147
- return {
148
- bind: id,
149
- view: () => {
150
- if (loading) {
151
- return '';
152
- } else {
153
- return footer.list
154
- .map((data: FooterItem) => {
155
- return html` <div class="${document.body.clientWidth > 768 ? '' : 'col-12 mt-2cs'}">
156
- <h6
157
- class="heading-xxs mb-3 f-title"
158
- onclick="${gvc.event(() => {
159
- if (data.link) {
160
- gvc.glitter.href = data.link;
161
- }
162
- })}"
163
- >
164
- ${data.title}
165
- </h6>
166
- <ul class="list-unstyled mb-7 f-ul">
167
- ${data.items
168
- .map((chi) => {
169
- return html` <li
170
- class="f-li"
171
- style="${chi.link ? 'cursor: pointer;' : ''}"
172
- onclick="${gvc.event(() => {
173
- if (chi.link) {
174
- gvc.glitter.href = chi.link;
175
- }
176
- })}"
177
- >
178
- <a class="f-aclass">${chi.title}</a>
179
- </li>`;
180
- })
181
- .join('')}
182
- </ul>
183
- </div>`;
184
- })
185
- .join('');
186
- }
187
- },
188
- divCreate: {
189
- class: document.body.clientWidth > 768 ? 'd-flex gap-5' : '',
190
- },
191
- onCreate: () => {
192
- if (loading) {
193
- ApiUser.getPublicConfig('footer-setting', 'manager').then((data) => {
194
- if (data.result && data.response.value) {
195
- footer.list = data.response.value;
196
- }
197
- loading = false;
198
- gvc.notifyDataChange(id);
199
- });
200
- }
201
- },
202
- };
203
- })()
204
- );
205
- } catch (error) {
206
- return '';
207
- }
208
- })()}
249
+ </div>
209
250
  </div>
210
251
  </div>
211
252
  </div>
212
- </div>
213
- <div class="py-6">
214
- <div class="container">
253
+ <div class="py-6">
254
+ <div class="container">
255
+ ${(formData.copy_right) ? `
215
256
  <div class="row">
216
257
  <div class="col text-center">
217
258
  <p class="my-2 f-copyright">
218
- ${(() => {
219
- const currentDate = new Date();
220
- const currentYear = currentDate.getFullYear();
221
- return `${currentYear} © ${formData.logo} , LTD. ALL RIGHTS RESERVED.`;
222
- })()}
259
+ ${formData.copy_right}
223
260
  </p>
224
261
  </div>
262
+ </div>` : ``}
263
+
225
264
  </div>
226
265
  </div>
227
- </div>
228
- </footer>`;
266
+ </footer>`;
229
267
  }
230
268
  }
231
269
 
@@ -179,7 +179,6 @@ export class ProductCard01 {
179
179
  });
180
180
  }
181
181
  if (Object.entries(label).length > 0) {
182
- console.log(label.data);
183
182
  function showPosition() {
184
183
  switch (label.data.position) {
185
184
  case "左上":
@@ -182,7 +182,6 @@ export class ProductCard01 {
182
182
  });
183
183
  }
184
184
  if (Object.entries(label).length > 0){
185
- console.log(label.data)
186
185
  function showPosition(){
187
186
  switch (label.data.position){
188
187
  case "左上":
@@ -178,7 +178,6 @@ export class ProductCard02 {
178
178
  });
179
179
  }
180
180
  if (Object.entries(label).length > 0) {
181
- console.log(label.data);
182
181
  function showPosition() {
183
182
  switch (label.data.position) {
184
183
  case "左上":
@@ -181,7 +181,6 @@ export class ProductCard02 {
181
181
  });
182
182
  }
183
183
  if (Object.entries(label).length > 0){
184
- console.log(label.data)
185
184
  function showPosition(){
186
185
  switch (label.data.position){
187
186
  case "左上":
@@ -180,7 +180,6 @@ export class ProductCard03 {
180
180
  });
181
181
  }
182
182
  if (Object.entries(label).length > 0) {
183
- console.log(label.data);
184
183
  function showPosition() {
185
184
  switch (label.data.position) {
186
185
  case "左上":
@@ -183,7 +183,6 @@ export class ProductCard03 {
183
183
  });
184
184
  }
185
185
  if (Object.entries(label).length > 0){
186
- console.log(label.data)
187
186
  function showPosition(){
188
187
  switch (label.data.position){
189
188
  case "左上":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "14.4.6",
3
+ "version": "14.4.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {