xmlui 0.10.19 → 0.10.21

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 (118) hide show
  1. package/dist/lib/{apiInterceptorWorker-DPgtUtdA.mjs → apiInterceptorWorker-QiltRtq1.mjs} +1 -1
  2. package/dist/lib/{index-cuh97e2e.mjs → index-BiS4wEuu.mjs} +1486 -1211
  3. package/dist/lib/index.css +1 -1
  4. package/dist/{metadata/initMock-C-cnv--V.mjs → lib/initMock-CB_cMi6U.mjs} +25 -15
  5. package/dist/lib/language-server-web-worker.mjs +1 -1
  6. package/dist/lib/language-server.mjs +1 -1
  7. package/dist/lib/{metadata-utils-CtY0QcvH.mjs → metadata-utils-BTIt1_wE.mjs} +1 -1
  8. package/dist/lib/{server-common-Cine5nRR.mjs → server-common-DYZtsdM7.mjs} +51 -14
  9. package/dist/lib/{transform-bHBjkKSL.mjs → transform-Tooy42EB.mjs} +16 -18
  10. package/dist/lib/xmlui-parser.mjs +2 -2
  11. package/dist/lib/{xmlui-serializer-DB6BLiXK.mjs → xmlui-serializer-uCYa8_tZ.mjs} +1 -1
  12. package/dist/lib/xmlui.d.ts +11 -3
  13. package/dist/lib/xmlui.mjs +2 -2
  14. package/dist/metadata/{apiInterceptorWorker-BmKP8bnq.mjs → apiInterceptorWorker-Dql7QGw2.mjs} +1 -1
  15. package/dist/metadata/{collectedComponentMetadata-Cp-9lpnG.mjs → collectedComponentMetadata-MFUg6aSX.mjs} +1655 -1390
  16. package/dist/{lib/initMock-BMxsanHc.mjs → metadata/initMock-Dw9wrVkQ.mjs} +25 -15
  17. package/dist/metadata/style.css +1 -1
  18. package/dist/metadata/xmlui-metadata.mjs +1 -1
  19. package/dist/metadata/xmlui-metadata.umd.js +3 -3
  20. package/dist/scripts/package.json +3 -6
  21. package/dist/scripts/src/components/Animation/AnimationNative.js +28 -28
  22. package/dist/scripts/src/components/App/App.js +4 -4
  23. package/dist/scripts/src/components/App/App.spec.js +17 -17
  24. package/dist/scripts/src/components/App/AppNative.js +1 -1
  25. package/dist/scripts/src/components/AppState/AppState.js +3 -2
  26. package/dist/scripts/src/components/AppState/AppState.spec.js +26 -2
  27. package/dist/scripts/src/components/AppState/AppStateNative.js +3 -4
  28. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +15 -10
  29. package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +4 -4
  30. package/dist/scripts/src/components/Carousel/Carousel.spec.js +214 -0
  31. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +1 -1
  32. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +2 -0
  33. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.spec.js +193 -0
  34. package/dist/scripts/src/components/DateInput/DateInput.spec.js +6 -6
  35. package/dist/scripts/src/components/DateInput/DateInputNative.js +0 -1
  36. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.spec.js +3 -3
  37. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +4 -13
  38. package/dist/scripts/src/components/Form/Form.spec.js +25 -9
  39. package/dist/scripts/src/components/Form/FormNative.js +7 -5
  40. package/dist/scripts/src/components/FormItem/FormItem.js +3 -1
  41. package/dist/scripts/src/components/FormItem/FormItem.spec.js +5 -14
  42. package/dist/scripts/src/components/FormItem/FormItemNative.js +12 -8
  43. package/dist/scripts/src/components/FormItem/Validations.js +2 -2
  44. package/dist/scripts/src/components/IFrame/IFrameNative.js +0 -2
  45. package/dist/scripts/src/components/IconRegistryContext.js +1 -1
  46. package/dist/scripts/src/components/List/ListNative.js +2 -2
  47. package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +3 -12
  48. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
  49. package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +6 -3
  50. package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +1 -1
  51. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +3 -3
  52. package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +2 -2
  53. package/dist/scripts/src/components/Pagination/Pagination.spec.js +5 -0
  54. package/dist/scripts/src/components/Pagination/PaginationNative.js +1 -3
  55. package/dist/scripts/src/components/Queue/Queue.spec.js +45 -47
  56. package/dist/scripts/src/components/Queue/QueueNative.js +1 -1
  57. package/dist/scripts/src/components/RadioGroup/RadioGroup.spec.js +5 -5
  58. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +1 -1
  59. package/dist/scripts/src/components/Select/MultiSelectOption.js +42 -0
  60. package/dist/scripts/src/components/Select/Select.js +3 -3
  61. package/dist/scripts/src/components/Select/SelectContext.js +8 -1
  62. package/dist/scripts/src/components/Select/SelectNative.js +134 -142
  63. package/dist/scripts/src/components/Select/SelectOption.js +34 -0
  64. package/dist/scripts/src/components/Select/SimpleSelect.js +57 -0
  65. package/dist/scripts/src/components/Spinner/Spinner.spec.js +1 -1
  66. package/dist/scripts/src/components/Table/useRowSelection.js +14 -23
  67. package/dist/scripts/src/components/Text/Text.js +5 -1
  68. package/dist/scripts/src/components/Text/Text.spec.js +317 -0
  69. package/dist/scripts/src/components/Text/TextNative.js +112 -1
  70. package/dist/scripts/src/components/TextArea/TextArea.spec.js +8 -8
  71. package/dist/scripts/src/components/Theme/Theme.js +2 -1
  72. package/dist/scripts/src/components/Theme/Theme.spec.js +266 -0
  73. package/dist/scripts/src/components/Theme/ThemeNative.js +8 -1
  74. package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +3 -3
  75. package/dist/scripts/src/components/TimeInput/TimeInputNative.js +0 -1
  76. package/dist/scripts/src/components/Timer/TimerNative.js +0 -1
  77. package/dist/scripts/src/components/Tree/TreeNative.js +16 -23
  78. package/dist/scripts/src/components-core/InspectorContext.js +1 -1
  79. package/dist/scripts/src/components-core/StandaloneApp.js +6 -8
  80. package/dist/scripts/src/components-core/action/FileUploadAction.js +1 -1
  81. package/dist/scripts/src/components-core/behaviors/BehaviorContext.js +50 -0
  82. package/dist/scripts/src/components-core/behaviors/CoreBehaviors.js +6 -1
  83. package/dist/scripts/src/components-core/interception/ApiInterceptor.js +9 -11
  84. package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +3 -3
  85. package/dist/scripts/src/components-core/interception/Backend.js +1 -1
  86. package/dist/scripts/src/components-core/interception/IndexedDb.js +64 -66
  87. package/dist/scripts/src/components-core/interception/apiInterceptorWorker.js +2 -2
  88. package/dist/scripts/src/components-core/loader/DataLoader.js +6 -14
  89. package/dist/scripts/src/components-core/loader/Loader.js +11 -11
  90. package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +4 -2
  91. package/dist/scripts/src/components-core/loader/PageableLoader.js +10 -9
  92. package/dist/scripts/src/components-core/rendering/AppContent.js +1 -7
  93. package/dist/scripts/src/components-core/rendering/ErrorBoundary.js +1 -1
  94. package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +1 -1
  95. package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +180 -186
  96. package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +6 -6
  97. package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +2 -2
  98. package/dist/scripts/src/components-core/utils/actionUtils.js +1 -1
  99. package/dist/scripts/src/components-core/utils/hooks.js +1 -1
  100. package/dist/scripts/src/components-core/utils/misc.js +4 -4
  101. package/dist/scripts/src/components-core/xmlui-parser.js +47 -31
  102. package/dist/scripts/src/language-server/server-common.js +25 -24
  103. package/dist/scripts/src/language-server/services/common/lsp-utils.js +2 -2
  104. package/dist/scripts/src/language-server/services/completion.js +20 -2
  105. package/dist/scripts/src/language-server/services/diagnostic.js +1 -1
  106. package/dist/scripts/src/language-server/services/hover.js +2 -2
  107. package/dist/scripts/src/parsers/common/utils.js +2 -2
  108. package/dist/scripts/src/parsers/scripting/Lexer.js +21 -15
  109. package/dist/scripts/src/parsers/scripting/Parser.js +8 -9
  110. package/dist/scripts/src/parsers/style-parser/StyleLexer.js +22 -22
  111. package/dist/scripts/src/parsers/style-parser/StyleParser.js +70 -68
  112. package/dist/scripts/src/testing/ComponentDrivers.js +20 -39
  113. package/dist/scripts/src/testing/component-test-helpers.js +34 -50
  114. package/dist/scripts/src/testing/fixtures.js +114 -113
  115. package/dist/scripts/src/testing/themed-app-test-helpers.js +7 -13
  116. package/dist/standalone/xmlui-standalone.es.d.ts +11 -3
  117. package/dist/standalone/xmlui-standalone.umd.js +35 -35
  118. package/package.json +3 -6
@@ -1,6 +1,6 @@
1
1
  import { delay as delay$1, HttpResponse, matchRequestUrl } from "msw";
2
2
  import { isArray, isObject, mapValues } from "lodash-es";
3
- import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-cuh97e2e.mjs";
3
+ import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./collectedComponentMetadata-MFUg6aSX.mjs";
4
4
  import Dexie from "dexie";
5
5
  var HttpStatusCode = /* @__PURE__ */ ((HttpStatusCode2) => {
6
6
  HttpStatusCode2[HttpStatusCode2["Continue"] = 100] = "Continue";
@@ -180,7 +180,7 @@ class Backend {
180
180
  return helper;
181
181
  });
182
182
  if (definition.initialize) {
183
- this.runFn(definition.initialize);
183
+ void this.runFn(definition.initialize);
184
184
  }
185
185
  }
186
186
  async executeOperation(operationId, requestParams, cookieService, headerService) {
@@ -370,8 +370,8 @@ class IndexedDb {
370
370
  return ret.find((_v, index) => results[index]);
371
371
  };
372
372
  this.getItemById = async (resourceId, id) => {
373
- return await this.getItem(resourceId, async (item) => {
374
- return item.id + "" === id + "";
373
+ return await this.getItem(resourceId, (item) => {
374
+ return Promise.resolve(item.id + "" === id + "");
375
375
  });
376
376
  };
377
377
  this.deleteItems = async (resourceId, predicate) => {
@@ -460,11 +460,11 @@ class IndexedDb {
460
460
  await this.db.transaction("rw", tables, actions);
461
461
  }
462
462
  }
463
- async function createTableWrapper(table) {
463
+ function createTableWrapper(table) {
464
464
  const getDataFn = () => table.db.table(table.name);
465
465
  const filteredData = async (predicate) => {
466
466
  const dataSnapshot = await table.toArray();
467
- const results = await Promise.all(dataSnapshot.map(predicate ?? (async () => true)));
467
+ const results = await Promise.all(dataSnapshot.map(predicate ?? (() => Promise.resolve(true))));
468
468
  return dataSnapshot.filter((_v, index) => results[index]);
469
469
  };
470
470
  return {
@@ -492,7 +492,7 @@ async function createTableWrapper(table) {
492
492
  if (table.schema.primKey.src === "++id") {
493
493
  safeId = Number(id);
494
494
  }
495
- return table.get(safeId);
495
+ return await table.get(safeId);
496
496
  },
497
497
  toArray: async () => await table.toArray(),
498
498
  single: async (predicate) => await new ReadOnlyCollection(await table.toArray()).single(predicate),
@@ -755,10 +755,7 @@ class ApiInterceptor {
755
755
  headers.append("Content-type", ret.type);
756
756
  headers.append("Content-Length", ret.size + "");
757
757
  const encodedFilename = encodeURIComponent(ret.name);
758
- headers.append(
759
- "Content-Disposition",
760
- `attachment; filename*=UTF-8''${encodedFilename}`
761
- );
758
+ headers.append("Content-Disposition", `attachment; filename*=UTF-8''${encodedFilename}`);
762
759
  return HttpResponse.arrayBuffer(await ret.arrayBuffer(), {
763
760
  headers,
764
761
  status: successStatusCode
@@ -804,20 +801,33 @@ class ApiInterceptor {
804
801
  }
805
802
  getMockForRequest(url, options) {
806
803
  return Object.entries(this.getOperations()).find(([operationId, operationDef]) => {
807
- if (matchRequestUrl(new URL(url, window.location.href), `${this.getApiUrl()}${operationDef.url}`, `${window.location.href}`).matches && (options.method || "get").toLowerCase() === operationDef.method.toLowerCase()) {
804
+ if (matchRequestUrl(
805
+ new URL(url, window.location.href),
806
+ `${this.getApiUrl()}${operationDef.url}`,
807
+ `${window.location.href}`
808
+ ).matches && (options.method || "get").toLowerCase() === operationDef.method.toLowerCase()) {
808
809
  return true;
809
810
  }
810
811
  return false;
811
812
  });
812
813
  }
813
- async executeMockedFetch(url, options) {
814
+ executeMockedFetch(url, options) {
814
815
  const mockForRequest = this.getMockForRequest(url, options);
815
816
  if (!mockForRequest) {
816
817
  throw new Error(`No mock found for request: ${url} with options: ${JSON.stringify(options)}`);
817
818
  }
818
819
  const [operationId, operationDef] = mockForRequest;
819
- const match = matchRequestUrl(new URL(url, window.location.href), `${this.getApiUrl()}${operationDef.url}`, `${window.location.href}`);
820
- return this.executeOperation(operationId, new Request(url, options), getCookiesAsObject(), match.params);
820
+ const match = matchRequestUrl(
821
+ new URL(url, window.location.href),
822
+ `${this.getApiUrl()}${operationDef.url}`,
823
+ `${window.location.href}`
824
+ );
825
+ return this.executeOperation(
826
+ operationId,
827
+ new Request(url, options),
828
+ getCookiesAsObject(),
829
+ match.params
830
+ );
821
831
  }
822
832
  }
823
833
  function getCookiesAsObject() {