@loaders.gl/ogc 5.0.0-beta.2 → 5.0.0-beta.4

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.
@@ -4,7 +4,7 @@
4
4
  import { CSWCapabilitiesFormat } from "./wms-format.js";
5
5
  // __VERSION__ is injected by babel-plugin-version-inline
6
6
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
- const VERSION = typeof "5.0.0-beta.2" !== 'undefined' ? "5.0.0-beta.2" : 'latest';
7
+ const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
8
8
  /** Preloads the parser-bearing CSW capabilities loader implementation. */
9
9
  async function preload() {
10
10
  const { CSWCapabilitiesLoaderWithParser } = await import("./csw-capabilities-loader-with-parser.js");
@@ -4,7 +4,7 @@
4
4
  import { CSWDomainFormat } from "./wms-format.js";
5
5
  // __VERSION__ is injected by babel-plugin-version-inline
6
6
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
- const VERSION = typeof "5.0.0-beta.2" !== 'undefined' ? "5.0.0-beta.2" : 'latest';
7
+ const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
8
8
  /** Preloads the parser-bearing CSW domain loader implementation. */
9
9
  async function preload() {
10
10
  const { CSWDomainLoaderWithParser } = await import("./csw-domain-loader-with-parser.js");
@@ -4,7 +4,7 @@
4
4
  import { CSWRecordsFormat } from "./wms-format.js";
5
5
  // __VERSION__ is injected by babel-plugin-version-inline
6
6
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
- const VERSION = typeof "5.0.0-beta.2" !== 'undefined' ? "5.0.0-beta.2" : 'latest';
7
+ const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
8
8
  /** Preloads the parser-bearing CSW records loader implementation. */
9
9
  async function preload() {
10
10
  const { CSWRecordsLoaderWithParser } = await import("./csw-records-loader-with-parser.js");
@@ -8,7 +8,7 @@ import { CSWDomainLoaderWithParser } from "./csw-domain-loader-with-parser.js";
8
8
  import { WMSErrorLoaderWithParser } from "./wms-error-loader-with-parser.js";
9
9
  // __VERSION__ is injected by babel-plugin-version-inline
10
10
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
11
- const VERSION = typeof "5.0.0-beta.2" !== 'undefined' ? "5.0.0-beta.2" : 'latest';
11
+ const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
12
12
  export const CSWSourceLoader = {
13
13
  dataType: null,
14
14
  batchType: null,
@@ -4,7 +4,7 @@
4
4
  import { GMLFormat } from "./wms-format.js";
5
5
  // __VERSION__ is injected by babel-plugin-version-inline
6
6
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
- const VERSION = typeof "5.0.0-beta.2" !== 'undefined' ? "5.0.0-beta.2" : 'latest';
7
+ const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
8
8
  /** Preloads the parser-bearing GML loader implementation. */
9
9
  async function preload() {
10
10
  const { GMLLoaderWithParser } = await import('@loaders.gl/ogc/gml-loader');
@@ -1595,6 +1595,7 @@ var init_parse_xml_internal = __esm({
1595
1595
  path: parent ? `${parent.path}.${elementName}` : elementName,
1596
1596
  attributes: this.normalizeAttributes(attributes),
1597
1597
  children: {},
1598
+ orderedChildren: [],
1598
1599
  text: ""
1599
1600
  });
1600
1601
  }
@@ -1609,6 +1610,11 @@ var init_parse_xml_internal = __esm({
1609
1610
  if (!node) return;
1610
1611
  const value = this.finalizeElement(node);
1611
1612
  const parent = this.stack[this.stack.length - 1];
1613
+ if (this.options.preserveOrder) {
1614
+ if (parent) parent.orderedChildren.push(value);
1615
+ else this.result = value;
1616
+ return;
1617
+ }
1612
1618
  if (parent) this.addChild(parent.children, node.name, node.path, value);
1613
1619
  else {
1614
1620
  if (this.result === void 0) this.result = {};
@@ -1618,6 +1624,9 @@ var init_parse_xml_internal = __esm({
1618
1624
  /** Converts a completed element, keeping grouping and coercion independent. */
1619
1625
  finalizeElement(node) {
1620
1626
  const text3 = this.options.trimValues === false ? node.text : node.text.trim();
1627
+ if (this.options.preserveOrder) {
1628
+ return { name: node.name, attributes: node.attributes, children: node.orderedChildren, text: text3 };
1629
+ }
1621
1630
  const hasAttributes = Object.keys(node.attributes).length > 0;
1622
1631
  if (!hasAttributes && !Object.keys(node.children).length) {
1623
1632
  return this.parseValue(text3, this.options.parseTagValue !== false);
@@ -1856,7 +1865,7 @@ var init_csw_capabilities_loader = __esm({
1856
1865
  "dist/wms/csw-capabilities-loader.js"() {
1857
1866
  "use strict";
1858
1867
  init_wms_format();
1859
- VERSION2 = true ? "5.0.0-beta.2" : "latest";
1868
+ VERSION2 = true ? "5.0.0-beta.4" : "latest";
1860
1869
  CSWCapabilitiesLoader = {
1861
1870
  ...CSWCapabilitiesFormat,
1862
1871
  dataType: null,
@@ -1944,7 +1953,7 @@ var init_csw_domain_loader = __esm({
1944
1953
  "dist/wms/csw-domain-loader.js"() {
1945
1954
  "use strict";
1946
1955
  init_wms_format();
1947
- VERSION3 = true ? "5.0.0-beta.2" : "latest";
1956
+ VERSION3 = true ? "5.0.0-beta.4" : "latest";
1948
1957
  CSWDomainLoader = {
1949
1958
  ...CSWDomainFormat,
1950
1959
  dataType: null,
@@ -2075,7 +2084,7 @@ var init_csw_records_loader = __esm({
2075
2084
  "dist/wms/csw-records-loader.js"() {
2076
2085
  "use strict";
2077
2086
  init_wms_format();
2078
- VERSION4 = true ? "5.0.0-beta.2" : "latest";
2087
+ VERSION4 = true ? "5.0.0-beta.4" : "latest";
2079
2088
  CSWRecordsLoader = {
2080
2089
  ...CSWRecordsFormat,
2081
2090
  dataType: null,
@@ -2162,7 +2171,7 @@ var init_wms_error_loader = __esm({
2162
2171
  "dist/wms/wms-error-loader.js"() {
2163
2172
  "use strict";
2164
2173
  init_wms_format();
2165
- VERSION5 = true ? "5.0.0-beta.2" : "latest";
2174
+ VERSION5 = true ? "5.0.0-beta.4" : "latest";
2166
2175
  WMSErrorLoader = {
2167
2176
  ...WMSErrorFormat,
2168
2177
  dataType: null,
@@ -2485,7 +2494,7 @@ var init_wms_capabilities_loader = __esm({
2485
2494
  "dist/wms/wms-capabilities-loader.js"() {
2486
2495
  "use strict";
2487
2496
  init_wms_format();
2488
- VERSION6 = true ? "5.0.0-beta.2" : "latest";
2497
+ VERSION6 = true ? "5.0.0-beta.4" : "latest";
2489
2498
  WMSCapabilitiesLoader = {
2490
2499
  ...WMSCapabilitiesFormat,
2491
2500
  dataType: null,
@@ -2986,7 +2995,7 @@ var init_wfs_capabilities_loader = __esm({
2986
2995
  "dist/wms/wfs-capabilities-loader.js"() {
2987
2996
  "use strict";
2988
2997
  init_wms_format();
2989
- VERSION7 = true ? "5.0.0-beta.2" : "latest";
2998
+ VERSION7 = true ? "5.0.0-beta.4" : "latest";
2990
2999
  WFSCapabilitiesLoader = {
2991
3000
  ...WFSCapabilitiesFormat,
2992
3001
  dataType: null,
@@ -3023,7 +3032,7 @@ var init_gml_loader_types = __esm({
3023
3032
  "dist/wms/gml-loader-types.js"() {
3024
3033
  "use strict";
3025
3034
  init_wms_format();
3026
- VERSION8 = true ? "5.0.0-beta.2" : "latest";
3035
+ VERSION8 = true ? "5.0.0-beta.4" : "latest";
3027
3036
  GMLLoader = {
3028
3037
  ...GMLFormat,
3029
3038
  dataType: null,
@@ -7808,7 +7817,7 @@ init_csw_capabilities_loader_with_parser();
7808
7817
  init_csw_records_loader_with_parser();
7809
7818
  init_csw_domain_loader_with_parser();
7810
7819
  init_wms_error_loader_with_parser();
7811
- var VERSION10 = true ? "5.0.0-beta.2" : "latest";
7820
+ var VERSION10 = true ? "5.0.0-beta.4" : "latest";
7812
7821
  var CSWSourceLoader = {
7813
7822
  dataType: null,
7814
7823
  batchType: null,