targetj 1.0.166 → 1.0.167

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/README.md CHANGED
@@ -166,6 +166,18 @@ App({
166
166
  }
167
167
  });
168
168
  ```
169
+ Or in HTML:
170
+
171
+ ```html
172
+ <div tg-users="TargetJS.fetch(this, ['https://targetjs.io/api/randomUser?id=user0', 'https://targetjs.io/api/randomUser?id=user1']);">
173
+ <div
174
+ tg-background="mediumpurple"
175
+ tg-width="[{ list: [100, 250, 100] }, 50, 10]"
176
+ tg-height$="return this.prevTargetValue / 2;"
177
+ tg-html="return this.getParentValueAtMyIndex('users')?.name;">
178
+ </div>
179
+ </div>
180
+ ```
169
181
 
170
182
  ## Comparison with Other UI Frameworks
171
183
 
@@ -277,8 +277,12 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
277
277
  } else if (domExists && !_TUtil.TUtil.isDefined(this.targets['reuseDomDefinition'])) {
278
278
  this.targets['reuseDomDefinition'] = true;
279
279
  this.targets['excludeXYCalc'] = true;
280
- this.targets['excludeX'] = true;
281
- this.targets['excludeY'] = true;
280
+ if (!this.targets['x']) {
281
+ this.targets['excludeX'] = true;
282
+ }
283
+ if (!this.targets['y']) {
284
+ this.targets['excludeY'] = true;
285
+ }
282
286
  this.targets['position'] = 'relative';
283
287
  }
284
288
  Object.keys(this.targets).forEach(function (key) {
@@ -255,7 +255,7 @@ var TargetUtil = exports.TargetUtil = /*#__PURE__*/function () {
255
255
  }, {
256
256
  key: "isFetchTarget",
257
257
  value: function isFetchTarget(key, value) {
258
- return key === 'fetch' && typeof value === 'string';
258
+ return key === 'fetch' && (typeof value === 'string' || Array.isArray(value));
259
259
  }
260
260
  }, {
261
261
  key: "isObjectTarget",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "targetj",
3
- "version": "1.0.166",
3
+ "version": "1.0.167",
4
4
  "description": "TargetJS is a JavaScript framework designed for creating animated and efficient web user interfaces.",
5
5
  "keywords": ["targetjs"],
6
6
  "main": "Export.js",