@builder.io/sdk 1.3.0 → 1.3.1

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.
Files changed (65) hide show
  1. package/.yarnrc.yml +1 -0
  2. package/CHANGELOG.md +1 -1
  3. package/coverage/clover.xml +3801 -108
  4. package/coverage/coverage-final.json +18 -2
  5. package/coverage/lcov-report/index.html +76 -31
  6. package/coverage/lcov-report/src/builder.class.ts.html +8107 -0
  7. package/coverage/lcov-report/src/classes/animator.class.ts.html +847 -0
  8. package/coverage/lcov-report/src/classes/cookies.class.ts.html +559 -0
  9. package/coverage/lcov-report/src/classes/index.html +74 -14
  10. package/coverage/lcov-report/src/classes/observable.class.ts.html +388 -0
  11. package/coverage/lcov-report/src/classes/promise.class.ts.html +607 -0
  12. package/coverage/lcov-report/src/classes/query-string.class.ts.html +47 -47
  13. package/coverage/lcov-report/src/functions/assign.function.ts.html +139 -0
  14. package/coverage/lcov-report/src/functions/fetch.function.ts.html +427 -0
  15. package/coverage/lcov-report/src/functions/get-top-level-domain.ts.html +121 -0
  16. package/coverage/lcov-report/src/functions/index.html +236 -0
  17. package/coverage/lcov-report/src/functions/next-tick.function.ts.html +184 -0
  18. package/coverage/lcov-report/src/functions/omit.function.ts.html +106 -0
  19. package/coverage/lcov-report/src/functions/server-only-require.function.ts.html +121 -0
  20. package/coverage/lcov-report/src/functions/throttle.function.ts.html +181 -0
  21. package/coverage/lcov-report/src/functions/to-error.ts.html +133 -0
  22. package/coverage/lcov-report/src/functions/uuid.ts.html +136 -0
  23. package/coverage/lcov-report/src/index.html +29 -14
  24. package/coverage/lcov-report/src/polyfills/custom-event-polyfill.js.html +121 -0
  25. package/coverage/lcov-report/src/polyfills/index.html +116 -0
  26. package/coverage/lcov-report/src/types/api-version.ts.html +91 -0
  27. package/coverage/lcov-report/src/types/index.html +116 -0
  28. package/coverage/lcov-report/src/url.ts.html +61 -61
  29. package/coverage/lcov.info +4234 -155
  30. package/dist/index.browser.js +1 -1
  31. package/dist/index.browser.js.map +1 -1
  32. package/dist/index.cjs.js +13 -3
  33. package/dist/index.cjs.js.map +1 -1
  34. package/dist/index.d.ts +7 -7
  35. package/dist/index.esm.js +13 -3
  36. package/dist/index.esm.js.map +1 -1
  37. package/dist/index.umd.js +13 -3
  38. package/dist/index.umd.js.map +1 -1
  39. package/dist/package.json +3 -7
  40. package/dist/src/builder.class.d.ts +1 -0
  41. package/dist/src/builder.class.js +12 -2
  42. package/dist/src/builder.class.js.map +1 -1
  43. package/dist/src/builder.class.test.d.ts +1 -0
  44. package/dist/src/builder.class.test.js +23 -0
  45. package/dist/src/builder.class.test.js.map +1 -0
  46. package/dist/src/classes/animator.class.d.ts +26 -26
  47. package/dist/src/classes/promise.class.d.ts +17 -17
  48. package/dist/src/classes/query-string.class.d.ts +9 -9
  49. package/dist/src/classes/query-string.class.test.d.ts +1 -1
  50. package/dist/src/constants/builder.d.ts +2 -2
  51. package/dist/src/functions/assign.function.d.ts +1 -1
  52. package/dist/src/functions/fetch.function.d.ts +28 -28
  53. package/dist/src/functions/finder.function.d.ts +10 -10
  54. package/dist/src/functions/get-top-level-domain.d.ts +6 -6
  55. package/dist/src/functions/omit.function.d.ts +1 -1
  56. package/dist/src/functions/throttle.function.d.ts +1 -1
  57. package/dist/src/functions/to-error.d.ts +13 -13
  58. package/dist/src/functions/uuid.d.ts +8 -8
  59. package/dist/src/types/api-version.d.ts +2 -2
  60. package/dist/src/types/content.d.ts +31 -31
  61. package/dist/src/types/element.d.ts +60 -60
  62. package/dist/src/url.test.d.ts +1 -1
  63. package/dist/tsconfig.tsbuildinfo +1 -1
  64. package/jest.config.ts +1 -3
  65. package/package.json +4 -8
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Builder, BuilderComponent, isBrowser, Input, Component, GetContentOptions, Class } from './src/builder.class';
2
- export { Builder, BuilderComponent, isBrowser, Input, Component, GetContentOptions, Class };
3
- export { BehaviorSubject, Subscription } from './src/classes/observable.class';
4
- export { BuilderElement } from './src/types/element';
5
- export { BuilderContent, BuilderContentVariation } from './src/types/content';
6
- export { ApiVersion } from './src/types/api-version';
7
- export { builder } from './src/constants/builder';
1
+ import { Builder, BuilderComponent, isBrowser, Input, Component, GetContentOptions, Class } from './src/builder.class';
2
+ export { Builder, BuilderComponent, isBrowser, Input, Component, GetContentOptions, Class };
3
+ export { BehaviorSubject, Subscription } from './src/classes/observable.class';
4
+ export { BuilderElement } from './src/types/element';
5
+ export { BuilderContent, BuilderContentVariation } from './src/types/content';
6
+ export { ApiVersion } from './src/types/api-version';
7
+ export { builder } from './src/constants/builder';
package/dist/index.esm.js CHANGED
@@ -123,7 +123,7 @@ function assertAllowedPropertyName(name) {
123
123
  throw new Error("Property name \"".concat(name, "\" is not allowed"));
124
124
  }
125
125
 
126
- var version = "1.2.0";
126
+ var version = "1.3.1";
127
127
 
128
128
  var Subscription = /** @class */ (function () {
129
129
  function Subscription(listeners, listener) {
@@ -1266,7 +1266,11 @@ var Builder = /** @class */ (function () {
1266
1266
  this.trustedHosts.push(host);
1267
1267
  };
1268
1268
  Builder.isTrustedHost = function (hostname) {
1269
- return (this.trustedHosts.findIndex(function (trustedHost) { return trustedHost === hostname || hostname.endsWith(".".concat(trustedHost)); }) > -1);
1269
+ return (this.trustedHosts.findIndex(function (trustedHost) {
1270
+ return trustedHost.startsWith('*.')
1271
+ ? hostname.endsWith(trustedHost.slice(1))
1272
+ : trustedHost === hostname;
1273
+ }) > -1);
1270
1274
  };
1271
1275
  Builder.runAction = function (action) {
1272
1276
  // TODO
@@ -2568,7 +2572,13 @@ var Builder = /** @class */ (function () {
2568
2572
  Builder.nextTick = nextTick;
2569
2573
  Builder.throttle = throttle;
2570
2574
  Builder.editors = [];
2571
- Builder.trustedHosts = ['builder.io', 'localhost'];
2575
+ Builder.trustedHosts = [
2576
+ '*.beta.builder.io',
2577
+ 'beta.builder.io',
2578
+ 'builder.io',
2579
+ 'localhost',
2580
+ 'qa.builder.io',
2581
+ ];
2572
2582
  Builder.plugins = [];
2573
2583
  Builder.actions = [];
2574
2584
  Builder.registry = {};