ts-glitter 14.0.2 → 14.0.3

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.0.2';
73
+ glitter.share.editerVersion = 'V_14.0.3';
74
74
  glitter.share.start = new Date();
75
75
  const vm = {
76
76
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -72,7 +72,7 @@ export class Entry {
72
72
  }
73
73
  (window as any).renderClock = (window as any).renderClock ?? clockF();
74
74
  console.log(`Entry-time:`, (window as any).renderClock.stop());
75
- glitter.share.editerVersion = 'V_14.0.2';
75
+ glitter.share.editerVersion = 'V_14.0.3';
76
76
  glitter.share.start = new Date();
77
77
  const vm: {
78
78
  appConfig: any;
@@ -82,7 +82,7 @@ export class BgProduct {
82
82
  options: FilterOptions.productOrderBy,
83
83
  })}
84
84
  </div>
85
- ${obj.gvc.map(vm.options
85
+ ${(obj.gvc.map(vm.options
86
86
  .filter((dd) => {
87
87
  return !obj.filter || obj.filter(dd);
88
88
  })
@@ -149,7 +149,7 @@ export class BgProduct {
149
149
  },
150
150
  };
151
151
  });
152
- }))}
152
+ }))).trim() || `<div class="w-100 d-flex align-items-center justify-content-center">尚未加入任何商品,請前往管理中心加入商品。</div>`}
153
153
  </div>
154
154
  <div class="c_dialog_bar">
155
155
  ${BgWidget.cancel(obj.gvc.event(() => {
@@ -111,48 +111,48 @@ export class BgProduct {
111
111
  options: FilterOptions.productOrderBy,
112
112
  })}
113
113
  </div>
114
- ${obj.gvc.map(
115
- vm.options
116
- .filter((dd) => {
117
- return !obj.filter || obj.filter(dd);
118
- })
119
- .map((opt, index) => {
120
- const id = gvc.glitter.getUUID();
121
- vm.ids.push({
122
- key: opt.key,
123
- id: id,
124
- });
114
+ ${(obj.gvc.map(
115
+ vm.options
116
+ .filter((dd) => {
117
+ return !obj.filter || obj.filter(dd);
118
+ })
119
+ .map((opt, index) => {
120
+ const id = gvc.glitter.getUUID();
121
+ vm.ids.push({
122
+ key: opt.key,
123
+ id: id,
124
+ });
125
125
 
126
- function call() {
127
- if (obj.single) {
128
- const tempArray = JSON.parse(JSON.stringify(obj.default));
129
- const tempKey = tempArray[0];
130
- obj.default = [];
131
- vm.ids
132
- .filter((item) => {
133
- return tempArray.includes(item.key);
134
- })
135
- .map((item) => {
136
- gvc.notifyDataChange(item.id);
137
- });
138
- if (tempKey !== opt.key) {
139
- obj.default = [opt.key];
140
- }
141
- } else {
142
- if (obj.default.includes(opt.key)) {
143
- obj.default = obj.default.filter((item) => item !== opt.key);
144
- } else {
145
- obj.default.push(opt.key);
126
+ function call() {
127
+ if (obj.single) {
128
+ const tempArray = JSON.parse(JSON.stringify(obj.default));
129
+ const tempKey = tempArray[0];
130
+ obj.default = [];
131
+ vm.ids
132
+ .filter((item) => {
133
+ return tempArray.includes(item.key);
134
+ })
135
+ .map((item) => {
136
+ gvc.notifyDataChange(item.id);
137
+ });
138
+ if (tempKey !== opt.key) {
139
+ obj.default = [opt.key];
140
+ }
141
+ } else {
142
+ if (obj.default.includes(opt.key)) {
143
+ obj.default = obj.default.filter((item) => item !== opt.key);
144
+ } else {
145
+ obj.default.push(opt.key);
146
+ }
147
+ }
148
+ gvc.notifyDataChange(id);
146
149
  }
147
- }
148
- gvc.notifyDataChange(id);
149
- }
150
150
 
151
- return gvc.bindView(() => {
152
- return {
153
- bind: id,
154
- view: () => {
155
- return html`<input
151
+ return gvc.bindView(() => {
152
+ return {
153
+ bind: id,
154
+ view: () => {
155
+ return html`<input
156
156
  class="form-check-input mt-0 ${vm.checkClass}"
157
157
  type="checkbox"
158
158
  id="${opt.key}"
@@ -172,15 +172,15 @@ export class BgProduct {
172
172
  <div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
173
173
  ${opt.note ? html` <div class="tx_gray_12">${opt.note}</div> ` : ''}
174
174
  </div>`;
175
- },
176
- divCreate: {
177
- class: `d-flex align-items-center`,
178
- style: `gap: 24px`,
179
- },
180
- };
181
- });
182
- })
183
- )}
175
+ },
176
+ divCreate: {
177
+ class: `d-flex align-items-center`,
178
+ style: `gap: 24px`,
179
+ },
180
+ };
181
+ });
182
+ })
183
+ ) ).trim() || `<div class="w-100 d-flex align-items-center justify-content-center">尚未加入任何商品,請前往管理中心加入商品。</div>`}
184
184
  </div>
185
185
  <div class="c_dialog_bar">
186
186
  ${BgWidget.cancel(
@@ -310,6 +310,9 @@ export class ApiShop {
310
310
  if (location.pathname.includes('/hidden/')) {
311
311
  par.push(`filter_visible=false`);
312
312
  }
313
+ else if (window.glitter.getUrlParameter('function') === 'user-editor') {
314
+ par.push(`filter_visible=true`);
315
+ }
313
316
  return par.join('&');
314
317
  })()}`,
315
318
  type: 'GET',
@@ -340,8 +340,10 @@ export class ApiShop {
340
340
  json.searchType && par.push(`searchType=${json.searchType}`);
341
341
  json.filter_visible && par.push(`filter_visible=${json.filter_visible}`);
342
342
  json.show_hidden && par.push(`show_hidden=${json.show_hidden}`);
343
- if (location.pathname.includes('/hidden/')) {
343
+ if(location.pathname.includes('/hidden/')) {
344
344
  par.push(`filter_visible=false`);
345
+ }else if ( (window as any).glitter.getUrlParameter('function')==='user-editor') {
346
+ par.push(`filter_visible=true`);
345
347
  }
346
348
  return par.join('&');
347
349
  })()}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "14.0.2",
3
+ "version": "14.0.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {