@esri/solutions-components 0.6.17 → 0.6.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/t9n/map-tools/resources.json +2 -1
  3. package/dist/assets/t9n/map-tools/resources_en.json +2 -1
  4. package/dist/assets/t9n/solution-spatial-ref/resources.json +0 -1
  5. package/dist/assets/t9n/solution-spatial-ref/resources_en.json +0 -1
  6. package/dist/assets/t9n/solution-spatial-ref/resources_fr.json +6 -0
  7. package/dist/assets/t9n/solution-spatial-ref/resources_he.json +6 -0
  8. package/dist/assets/t9n/spatial-ref/resources.json +3 -0
  9. package/dist/assets/t9n/spatial-ref/resources_en.json +3 -0
  10. package/dist/assets/t9n/spatial-ref/resources_fr.json +3 -0
  11. package/dist/assets/t9n/spatial-ref/resources_he.json +3 -0
  12. package/dist/cjs/{basemap-gallery_6.cjs.entry.js → basemap-gallery_7.cjs.entry.js} +124 -3
  13. package/dist/cjs/{calcite-tree_3.cjs.entry.js → calcite-checkbox_3.cjs.entry.js} +123 -319
  14. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +4 -3
  15. package/dist/cjs/card-manager_3.cjs.entry.js +8 -5
  16. package/dist/{collection/components/basemap-gallery/test/basemap-gallery.e2e.js → cjs/common-13719149.js} +17 -9
  17. package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -7
  18. package/dist/cjs/edit-card_2.cjs.entry.js +4 -3
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/cjs/solution-configuration.cjs.entry.js +2 -1
  21. package/dist/cjs/solution-contents_3.cjs.entry.js +21 -21256
  22. package/dist/cjs/solution-item-icon.cjs.entry.js +327 -0
  23. package/dist/cjs/{solution-store-c443e657.js → solution-resource-f9e3b289.js} +2 -1698
  24. package/dist/cjs/solution-store-2414dd8a.js +1707 -0
  25. package/dist/cjs/solutions-components.cjs.js +1 -1
  26. package/dist/cjs/spatial-ref.cjs.entry.js +21293 -0
  27. package/dist/collection/collection-manifest.json +2 -0
  28. package/dist/collection/components/card-manager/card-manager.js +1 -1
  29. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +15 -0
  30. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +47 -6
  31. package/dist/collection/components/edit-card/edit-card.css +0 -12
  32. package/dist/collection/components/floor-filter/floor-filter.css +19 -0
  33. package/dist/collection/components/floor-filter/floor-filter.js +163 -0
  34. package/dist/collection/components/info-card/info-card.js +3 -2
  35. package/dist/collection/components/layer-table/layer-table.css +8 -0
  36. package/dist/collection/components/layer-table/layer-table.js +18 -2
  37. package/dist/collection/components/map-card/map-card.js +19 -1
  38. package/dist/collection/components/map-picker/map-picker.css +0 -4
  39. package/dist/collection/components/map-picker/map-picker.js +1 -1
  40. package/dist/collection/components/map-tools/map-tools.js +54 -1
  41. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.css +1 -7
  42. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +37 -291
  43. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.e2e.js +24 -12
  44. package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.spec.js +32 -128
  45. package/dist/collection/components/spatial-ref/spatial-ref.css +20 -0
  46. package/dist/collection/components/spatial-ref/spatial-ref.js +445 -0
  47. package/dist/collection/components/spatial-ref/test/spatial-ref.e2e.js +71 -0
  48. package/dist/collection/components/spatial-ref/test/spatial-ref.spec.js +158 -0
  49. package/dist/collection/demos/crowdsource-manager.html +4 -0
  50. package/dist/collection/demos/solution-spatial-ref.html +9 -16
  51. package/dist/collection/demos/spatial-ref.html +53 -0
  52. package/dist/collection/utils/{templates.e2e.js → test/templates.e2e.js} +2 -2
  53. package/dist/collection/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
  54. package/dist/components/card-manager2.js +1 -1
  55. package/dist/components/crowdsource-manager.js +86 -73
  56. package/dist/components/edit-card2.js +1 -1
  57. package/dist/components/floor-filter.d.ts +11 -0
  58. package/dist/components/floor-filter.js +11 -0
  59. package/dist/components/floor-filter2.js +115 -0
  60. package/dist/components/info-card2.js +3 -2
  61. package/dist/components/layer-table2.js +5 -3
  62. package/dist/components/map-card2.js +45 -37
  63. package/dist/components/map-picker2.js +2 -2
  64. package/dist/components/map-tools2.js +52 -11
  65. package/dist/components/solution-configuration.js +79 -72
  66. package/dist/components/solution-resource-item2.js +2 -1
  67. package/dist/components/solution-resource.js +1836 -0
  68. package/dist/components/solution-spatial-ref2.js +41 -21277
  69. package/dist/components/solution-store.js +2 -1830
  70. package/dist/components/spatial-ref.d.ts +11 -0
  71. package/dist/components/spatial-ref.js +11 -0
  72. package/dist/components/spatial-ref2.js +21374 -0
  73. package/dist/esm/{basemap-gallery_6.entry.js → basemap-gallery_7.entry.js} +124 -4
  74. package/dist/esm/{calcite-tree_3.entry.js → calcite-checkbox_3.entry.js} +125 -321
  75. package/dist/esm/calcite-shell-panel_14.entry.js +2 -1
  76. package/dist/esm/card-manager_3.entry.js +8 -5
  77. package/dist/{collection/components/layer-table/test/layer-table.e2e.js → esm/common-e4a8e353.js} +15 -9
  78. package/dist/esm/crowdsource-manager.entry.js +12 -7
  79. package/dist/esm/edit-card_2.entry.js +4 -3
  80. package/dist/esm/loader.js +1 -1
  81. package/dist/esm/polyfills/core-js.js +11 -0
  82. package/dist/esm/polyfills/dom.js +79 -0
  83. package/dist/esm/polyfills/es5-html-element.js +1 -0
  84. package/dist/esm/polyfills/index.js +34 -0
  85. package/dist/esm/polyfills/system.js +6 -0
  86. package/dist/esm/solution-configuration.entry.js +2 -1
  87. package/dist/esm/solution-contents_3.entry.js +20 -21255
  88. package/dist/esm/solution-item-icon.entry.js +323 -0
  89. package/dist/esm/{solution-store-b29d50f7.js → solution-resource-be35d35b.js} +1 -1697
  90. package/dist/esm/solution-store-e734626a.js +1704 -0
  91. package/dist/esm/solutions-components.js +1 -1
  92. package/dist/esm/spatial-ref.entry.js +21289 -0
  93. package/dist/solutions-components/demos/crowdsource-manager.html +4 -0
  94. package/dist/solutions-components/demos/solution-spatial-ref.html +9 -16
  95. package/dist/solutions-components/demos/spatial-ref.html +53 -0
  96. package/dist/solutions-components/{p-64d29ba2.entry.js → p-0bc27ba7.entry.js} +2 -2
  97. package/dist/{collection/components/map-card/test/map-card.e2e.js → solutions-components/p-1b228f97.js} +2 -10
  98. package/dist/solutions-components/p-5b8c8942.entry.js +21 -0
  99. package/dist/solutions-components/p-63c6fc29.entry.js +6 -0
  100. package/dist/solutions-components/p-64945b43.entry.js +18 -0
  101. package/dist/solutions-components/p-770bff06.entry.js +6 -0
  102. package/dist/solutions-components/p-7741dbab.entry.js +6 -0
  103. package/dist/solutions-components/p-80465067.entry.js +6 -0
  104. package/dist/solutions-components/p-846df994.entry.js +6 -0
  105. package/dist/solutions-components/p-b3f8d2cb.js +192 -0
  106. package/dist/solutions-components/p-c26d8b36.entry.js +6 -0
  107. package/dist/solutions-components/{p-4d942b0f.entry.js → p-f35147d5.entry.js} +1 -1
  108. package/dist/solutions-components/p-ff0d7712.js +44 -0
  109. package/dist/solutions-components/solutions-components.esm.js +1 -1
  110. package/dist/solutions-components/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
  111. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +9 -1
  112. package/dist/types/components/floor-filter/floor-filter.d.ts +61 -0
  113. package/dist/types/components/layer-table/layer-table.d.ts +4 -0
  114. package/dist/types/components/map-card/map-card.d.ts +4 -0
  115. package/dist/types/components/map-tools/map-tools.d.ts +24 -0
  116. package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +11 -93
  117. package/dist/types/components/spatial-ref/spatial-ref.d.ts +142 -0
  118. package/dist/types/components.d.ts +123 -16
  119. package/dist/types/preact.d.ts +8 -1
  120. package/package.json +6 -6
  121. package/dist/cjs/calcite-checkbox.cjs.entry.js +0 -136
  122. package/dist/collection/components/basemap-gallery/test/basemap-gallery.spec.js +0 -37
  123. package/dist/collection/components/buffer-tools/test/buffer-tools.e2e.js +0 -29
  124. package/dist/collection/components/buffer-tools/test/buffer-tools.spec.js +0 -160
  125. package/dist/collection/components/card-manager/test/card-manager.e2e.js +0 -29
  126. package/dist/collection/components/card-manager/test/card-manager.spec.js +0 -37
  127. package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.e2e.js +0 -29
  128. package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.spec.js +0 -37
  129. package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.e2e.js +0 -29
  130. package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.spec.js +0 -37
  131. package/dist/collection/components/deduct-calculator/test/deduct-calculator.e2e.js +0 -29
  132. package/dist/collection/components/deduct-calculator/test/deduct-calculator.spec.js +0 -37
  133. package/dist/collection/components/edit-card/test/edit-card.e2e.js +0 -14
  134. package/dist/collection/components/edit-card/test/edit-card.spec.js +0 -22
  135. package/dist/collection/components/info-card/test/info-card.e2e.js +0 -29
  136. package/dist/collection/components/info-card/test/info-card.spec.js +0 -37
  137. package/dist/collection/components/json-editor/test/json-editor.e2e.js +0 -36
  138. package/dist/collection/components/json-editor/test/json-editor.spec.js +0 -65
  139. package/dist/collection/components/layer-table/test/layer-table.spec.js +0 -37
  140. package/dist/collection/components/layout-manager/test/layout-manager.e2e.js +0 -29
  141. package/dist/collection/components/layout-manager/test/layout-manager.spec.js +0 -37
  142. package/dist/collection/components/list-item/test/list-item.e2e.js +0 -29
  143. package/dist/collection/components/list-item/test/list-item.spec.js +0 -37
  144. package/dist/collection/components/map-card/test/map-card.spec.js +0 -37
  145. package/dist/collection/components/map-draw-tools/test/map-draw-tools.e2e.js +0 -29
  146. package/dist/collection/components/map-draw-tools/test/map-draw-tools.spec.js +0 -37
  147. package/dist/collection/components/map-fullscreen/test/map-fullscreen.e2e.js +0 -29
  148. package/dist/collection/components/map-fullscreen/test/map-fullscreen.spec.js +0 -37
  149. package/dist/collection/components/map-layer-picker/test/map-layer-picker.e2e.js +0 -29
  150. package/dist/collection/components/map-layer-picker/test/map-layer-picker.spec.js +0 -114
  151. package/dist/collection/components/map-legend/test/map-legend.e2e.js +0 -14
  152. package/dist/collection/components/map-legend/test/map-legend.spec.js +0 -22
  153. package/dist/collection/components/map-picker/test/map-picker.e2e.js +0 -29
  154. package/dist/collection/components/map-picker/test/map-picker.spec.js +0 -37
  155. package/dist/collection/components/map-search/test/map-search.e2e.js +0 -29
  156. package/dist/collection/components/map-search/test/map-search.spec.js +0 -37
  157. package/dist/collection/components/map-select-tools/test/map-select-tools.e2e.js +0 -29
  158. package/dist/collection/components/map-select-tools/test/map-select-tools.spec.js +0 -366
  159. package/dist/collection/components/map-tools/test/map-tools.e2e.js +0 -29
  160. package/dist/collection/components/map-tools/test/map-tools.spec.js +0 -37
  161. package/dist/collection/components/pci-calculator/test/pci-calculator.e2e.js +0 -29
  162. package/dist/collection/components/pci-calculator/test/pci-calculator.spec.js +0 -37
  163. package/dist/collection/components/pdf-download/test/pdf-download.e2e.js +0 -76
  164. package/dist/collection/components/pdf-download/test/pdf-download.spec.js +0 -107
  165. package/dist/collection/components/public-notification/test/public-notification.spec.js +0 -161
  166. package/dist/collection/components/refine-selection/test/refine-selection.e2e.js +0 -14
  167. package/dist/collection/components/refine-selection/test/refine-selection.spec.js +0 -22
  168. package/dist/collection/components/solution-configuration/test/solution-configuration.e2e.js +0 -36
  169. package/dist/collection/components/solution-configuration/test/solution-configuration.spec.js +0 -119
  170. package/dist/collection/components/solution-contents/test/solution-contents.e2e.js +0 -94
  171. package/dist/collection/components/solution-contents/test/solution-contents.spec.js +0 -143
  172. package/dist/collection/components/solution-item/test/solution-item.e2e.js +0 -36
  173. package/dist/collection/components/solution-item/test/solution-item.spec.js +0 -77
  174. package/dist/collection/components/solution-item-details/test/solution-item-details.e2e.js +0 -36
  175. package/dist/collection/components/solution-item-details/test/solution-item-details.spec.js +0 -142
  176. package/dist/collection/components/solution-item-icon/test/solution-item-icon.e2e.js +0 -29
  177. package/dist/collection/components/solution-item-icon/test/solution-item-icon.spec.js +0 -39
  178. package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.e2e.js +0 -36
  179. package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.spec.js +0 -54
  180. package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.e2e.js +0 -36
  181. package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.spec.js +0 -65
  182. package/dist/collection/components/solution-resource-item/test/solution-resource-item.e2e.js +0 -36
  183. package/dist/collection/components/solution-resource-item/test/solution-resource-item.spec.js +0 -55
  184. package/dist/collection/components/solution-template-data/test/solution-template-data.e2e.js +0 -36
  185. package/dist/collection/components/solution-template-data/test/solution-template-data.spec.js +0 -60
  186. package/dist/collection/components/solution-variables/test/solution-variables.e2e.js +0 -36
  187. package/dist/collection/components/solution-variables/test/solution-variables.spec.js +0 -131
  188. package/dist/esm/calcite-checkbox.entry.js +0 -132
  189. package/dist/solutions-components/p-17d176b5.js +0 -230
  190. package/dist/solutions-components/p-1d9a5198.entry.js +0 -37
  191. package/dist/solutions-components/p-3707d9bd.entry.js +0 -6
  192. package/dist/solutions-components/p-41bbccbc.entry.js +0 -6
  193. package/dist/solutions-components/p-4f2fce86.entry.js +0 -6
  194. package/dist/solutions-components/p-5ffaaaf4.entry.js +0 -6
  195. package/dist/solutions-components/p-736e76fb.entry.js +0 -17
  196. package/dist/solutions-components/p-dda517b9.entry.js +0 -6
  197. /package/dist/collection/components/{solution-spatial-ref → spatial-ref}/spatialreferences.js +0 -0
  198. /package/dist/types/components/{solution-spatial-ref → spatial-ref}/spatialreferences.d.ts +0 -0
@@ -1,136 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- 'use strict';
7
-
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
- const index = require('./index-ee37804b.js');
11
- const dom = require('./dom-8d00cc3f.js');
12
- const form = require('./form-44895e53.js');
13
- const guid = require('./guid-c351776c.js');
14
- const interactive = require('./interactive-7837b73d.js');
15
- const key = require('./key-07312a4b.js');
16
- const label = require('./label-39887629.js');
17
- const loadable = require('./loadable-5d36908d.js');
18
- require('./resources-2278b321.js');
19
- require('./browser-596d8e1e.js');
20
-
21
- const checkboxCss = ":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-checkbox-size:0.75rem}:host([scale=m]){--calcite-checkbox-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-checkbox-size:1rem}:host{position:relative;display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg,:host .toggle{inline-size:var(--calcite-checkbox-size);block-size:var(--calcite-checkbox-size)}:host .check-svg{pointer-events:none;box-sizing:border-box;display:block;overflow:hidden;background-color:var(--calcite-ui-foreground-1);fill:currentColor;stroke:currentColor;stroke-width:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);color:var(--calcite-ui-background)}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([hovered]) .toggle .check-svg,:host .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}.toggle{outline-color:transparent}.toggle:active,.toggle:focus,.toggle:focus-visible{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}";
22
-
23
- const Checkbox = class {
24
- constructor(hostRef) {
25
- index.registerInstance(this, hostRef);
26
- this.calciteInternalCheckboxBlur = index.createEvent(this, "calciteInternalCheckboxBlur", 6);
27
- this.calciteCheckboxChange = index.createEvent(this, "calciteCheckboxChange", 6);
28
- this.calciteInternalCheckboxFocus = index.createEvent(this, "calciteInternalCheckboxFocus", 6);
29
- this.checkedPath = "M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z";
30
- this.indeterminatePath = "M13 8v1H3V8z";
31
- this.getPath = () => this.indeterminate ? this.indeterminatePath : this.checked ? this.checkedPath : "";
32
- this.toggle = () => {
33
- if (!this.disabled) {
34
- this.checked = !this.checked;
35
- this.setFocus();
36
- this.indeterminate = false;
37
- this.calciteCheckboxChange.emit();
38
- }
39
- };
40
- this.keyDownHandler = (event) => {
41
- if (key.isActivationKey(event.key)) {
42
- this.toggle();
43
- event.preventDefault();
44
- }
45
- };
46
- this.clickHandler = () => {
47
- if (this.disabled) {
48
- return;
49
- }
50
- this.toggle();
51
- };
52
- //--------------------------------------------------------------------------
53
- //
54
- // Event Listeners
55
- //
56
- //--------------------------------------------------------------------------
57
- this.onToggleBlur = () => {
58
- this.calciteInternalCheckboxBlur.emit(false);
59
- };
60
- this.onToggleFocus = () => {
61
- this.calciteInternalCheckboxFocus.emit(true);
62
- };
63
- this.onLabelClick = () => {
64
- this.toggle();
65
- };
66
- this.checked = false;
67
- this.disabled = false;
68
- this.form = undefined;
69
- this.guid = undefined;
70
- this.hovered = false;
71
- this.indeterminate = false;
72
- this.label = undefined;
73
- this.name = undefined;
74
- this.required = false;
75
- this.scale = "m";
76
- this.value = undefined;
77
- }
78
- //--------------------------------------------------------------------------
79
- //
80
- // Public Methods
81
- //
82
- //--------------------------------------------------------------------------
83
- /** Sets focus on the component. */
84
- async setFocus() {
85
- var _a;
86
- await loadable.componentFocusable(this);
87
- (_a = this.toggleEl) === null || _a === void 0 ? void 0 : _a.focus();
88
- }
89
- //--------------------------------------------------------------------------
90
- //
91
- // Private Methods
92
- //
93
- //--------------------------------------------------------------------------
94
- syncHiddenFormInput(input) {
95
- input.type = "checkbox";
96
- }
97
- //--------------------------------------------------------------------------
98
- //
99
- // Lifecycle
100
- //
101
- //--------------------------------------------------------------------------
102
- connectedCallback() {
103
- this.guid = this.el.id || `calcite-checkbox-${guid.guid()}`;
104
- interactive.connectInteractive(this);
105
- label.connectLabel(this);
106
- form.connectForm(this);
107
- }
108
- disconnectedCallback() {
109
- interactive.disconnectInteractive(this);
110
- label.disconnectLabel(this);
111
- form.disconnectForm(this);
112
- }
113
- componentWillLoad() {
114
- loadable.setUpLoadableComponent(this);
115
- }
116
- componentDidLoad() {
117
- loadable.setComponentLoaded(this);
118
- }
119
- componentDidRender() {
120
- interactive.updateHostInteraction(this);
121
- }
122
- // --------------------------------------------------------------------------
123
- //
124
- // Render Methods
125
- //
126
- // --------------------------------------------------------------------------
127
- render() {
128
- return (index.h(index.Host, { onClick: this.clickHandler, onKeyDown: this.keyDownHandler }, index.h("div", { "aria-checked": dom.toAriaBoolean(this.checked), "aria-label": label.getLabelText(this), class: "toggle", onBlur: this.onToggleBlur, onFocus: this.onToggleFocus, role: "checkbox", tabIndex: this.disabled ? undefined : 0,
129
- // eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
130
- ref: (toggleEl) => (this.toggleEl = toggleEl) }, index.h("svg", { "aria-hidden": "true", class: "check-svg", viewBox: "0 0 16 16" }, index.h("path", { d: this.getPath() })), index.h("slot", null)), index.h(form.HiddenFormInputSlot, { component: this })));
131
- }
132
- get el() { return index.getElement(this); }
133
- };
134
- Checkbox.style = checkboxCss;
135
-
136
- exports.calcite_checkbox = Checkbox;
@@ -1,37 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { BasemapGallery } from "../basemap-gallery";
23
- xdescribe('basemap-gallery', () => {
24
- it('renders', async () => {
25
- const page = await newSpecPage({
26
- components: [BasemapGallery],
27
- html: `<basemap-gallery></basemap-gallery>`,
28
- });
29
- expect(page.root).toEqualHtml(`
30
- <basemap-gallery>
31
- <mock:shadow-root>
32
- <slot></slot>
33
- </mock:shadow-root>
34
- </basemap-gallery>
35
- `);
36
- });
37
- });
@@ -1,29 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newE2EPage } from "@stencil/core/testing";
22
- xdescribe('buffer-tools', () => {
23
- it('renders', async () => {
24
- const page = await newE2EPage();
25
- await page.setContent('<buffer-tools></buffer-tools>');
26
- const element = await page.find('buffer-tools');
27
- expect(element).toHaveClass('hydrated');
28
- });
29
- });
@@ -1,160 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { h } from "@stencil/core";
22
- import { newSpecPage } from "@stencil/core/testing";
23
- import { BufferTools } from "../buffer-tools";
24
- import * as locale from "../../../utils/locale";
25
- import * as translations from "../../../assets/t9n/buffer-tools/resources.json";
26
- jest.setTimeout(30000);
27
- afterEach(() => {
28
- jest.restoreAllMocks();
29
- });
30
- beforeEach(() => {
31
- jest.spyOn(locale, "getLocaleComponentStrings").mockImplementation(() => [
32
- translations
33
- ]);
34
- jest.useFakeTimers();
35
- });
36
- xdescribe('buffer-tools', () => {
37
- it('renders as text', async () => {
38
- const page = await newSpecPage({
39
- autoApplyChanges: true,
40
- components: [BufferTools],
41
- template: () => (h("buffer-tools", null)),
42
- });
43
- expect(page.root).toEqualHtml(`
44
- <buffer-tools>
45
- <mock:shadow-root>
46
- <div class="c-container">
47
- <calcite-input class="padding-end-1" number-button-type="vertical" placeholder="0" type="number"></calcite-input>
48
- <calcite-select class="flex-1" label="label">
49
- <calcite-option label="Feet" value="feet"></calcite-option>
50
- <calcite-option label="Meters" selected="" value="meters"></calcite-option>
51
- <calcite-option label="Miles" value="miles"></calcite-option>
52
- <calcite-option label="Kilometers" value="kilometers"></calcite-option>
53
- </calcite-select>
54
- </div>
55
- </mock:shadow-root>
56
- </buffer-tools>
57
- `);
58
- });
59
- it('renders as slider', async () => {
60
- const page = await newSpecPage({
61
- autoApplyChanges: true,
62
- components: [BufferTools],
63
- template: () => (h("buffer-tools", { appearance: 'slider' })),
64
- });
65
- expect(page.root).toEqualHtml(`
66
- <buffer-tools>
67
- <mock:shadow-root>
68
- <div>
69
- <calcite-slider labelhandles="" max="100" min="0" ticks="10"></calcite-slider>
70
- </div>
71
- </mock:shadow-root>
72
- </buffer-tools>
73
- `);
74
- });
75
- it('_setDistance', async () => {
76
- const timeout = jest.spyOn(global, 'setTimeout');
77
- const cleartimeout = jest.spyOn(global, 'clearTimeout');
78
- const page = await newSpecPage({
79
- autoApplyChanges: true,
80
- components: [BufferTools],
81
- template: () => (h("buffer-tools", null)),
82
- });
83
- expect(page.root).toEqualHtml(`
84
- <buffer-tools>
85
- <mock:shadow-root>
86
- <div class="c-container">
87
- <calcite-input class="padding-end-1" number-button-type="vertical" placeholder="0" type="number"></calcite-input>
88
- <calcite-select class="flex-1" label="label">
89
- <calcite-option label="Feet" value="feet"></calcite-option>
90
- <calcite-option label="Meters" selected="" value="meters"></calcite-option>
91
- <calcite-option label="Miles" value="miles"></calcite-option>
92
- <calcite-option label="Kilometers" value="kilometers"></calcite-option>
93
- </calcite-select>
94
- </div>
95
- </mock:shadow-root>
96
- </buffer-tools>
97
- `);
98
- let matcher = undefined;
99
- page.root.geometries = [{}];
100
- jest.runAllTimers();
101
- page.doc.addEventListener("bufferComplete", (evt) => {
102
- expect(evt.detail).toEqual(matcher);
103
- });
104
- page.rootInstance._testAccess("_setDistance", { detail: { value: 0 } });
105
- jest.runAllTimers();
106
- page.rootInstance._testAccess("_setDistance", { detail: { value: 1 } });
107
- jest.runAllTimers();
108
- expect(timeout).toBeCalledTimes(3);
109
- expect(cleartimeout).toBeCalledTimes(2);
110
- timeout.mockReset();
111
- timeout.mockRestore();
112
- cleartimeout.mockReset();
113
- cleartimeout.mockRestore();
114
- });
115
- it('geometries watch', async () => {
116
- const timeout = jest.spyOn(global, 'setTimeout');
117
- const cleartimeout = jest.spyOn(global, 'clearTimeout');
118
- const page = await newSpecPage({
119
- autoApplyChanges: true,
120
- components: [BufferTools],
121
- template: () => (h("buffer-tools", null)),
122
- });
123
- expect(page.root).toEqualHtml(`
124
- <buffer-tools>
125
- <mock:shadow-root>
126
- <div class="c-container">
127
- <calcite-input class="padding-end-1" number-button-type="vertical" placeholder="0" type="number"></calcite-input>
128
- <calcite-select class="flex-1" label="label">
129
- <calcite-option label="Feet" value="feet"></calcite-option>
130
- <calcite-option label="Meters" selected="" value="meters"></calcite-option>
131
- <calcite-option label="Miles" value="miles"></calcite-option>
132
- <calcite-option label="Kilometers" value="kilometers"></calcite-option>
133
- </calcite-select>
134
- </div>
135
- </mock:shadow-root>
136
- </buffer-tools>
137
- `);
138
- page.root.geometries = [{}];
139
- page.root.geometries = [];
140
- expect(timeout).toBeCalledTimes(3);
141
- expect(cleartimeout).toBeCalledTimes(2);
142
- timeout.mockReset();
143
- timeout.mockRestore();
144
- cleartimeout.mockReset();
145
- cleartimeout.mockRestore();
146
- });
147
- it('have expected defaults', () => {
148
- const bufferTools = new BufferTools();
149
- expect(bufferTools.appearance).toEqual('text');
150
- expect(bufferTools.distance).toEqual(0);
151
- expect(bufferTools.geometries).toEqual([]);
152
- expect(bufferTools.sliderTicks).toEqual(10);
153
- expect(bufferTools.unionResults).toEqual(true);
154
- expect(bufferTools.unit).toEqual('meters');
155
- });
156
- it('have expected defaults', () => {
157
- const bufferTools = new BufferTools();
158
- bufferTools._testAccess("_setUnit", "meters");
159
- });
160
- });
@@ -1,29 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newE2EPage } from "@stencil/core/testing";
22
- xdescribe('card-manager', () => {
23
- it('renders', async () => {
24
- const page = await newE2EPage();
25
- await page.setContent('<card-manager></card-manager>');
26
- const element = await page.find('card-manager');
27
- expect(element).toHaveClass('hydrated');
28
- });
29
- });
@@ -1,37 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { CardManager } from "../card-manager";
23
- xdescribe('card-manager', () => {
24
- it('renders', async () => {
25
- const page = await newSpecPage({
26
- components: [CardManager],
27
- html: `<card-manager></card-manager>`,
28
- });
29
- expect(page.root).toEqualHtml(`
30
- <card-manager>
31
- <mock:shadow-root>
32
- <slot></slot>
33
- </mock:shadow-root>
34
- </card-manager>
35
- `);
36
- });
37
- });
@@ -1,29 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newE2EPage } from "@stencil/core/testing";
22
- xdescribe('crowdsource-manager', () => {
23
- it('renders', async () => {
24
- const page = await newE2EPage();
25
- await page.setContent('<crowdsource-manager></crowdsource-manager>');
26
- const element = await page.find('crowdsource-manager');
27
- expect(element).toHaveClass('hydrated');
28
- });
29
- });
@@ -1,37 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { CrowdsourceManager } from "../crowdsource-manager";
23
- xdescribe('crowdsource-manager', () => {
24
- it('renders', async () => {
25
- const page = await newSpecPage({
26
- components: [CrowdsourceManager],
27
- html: `<crowdsource-manager></crowdsource-manager>`,
28
- });
29
- expect(page.root).toEqualHtml(`
30
- <crowdsource-manager>
31
- <mock:shadow-root>
32
- <slot></slot>
33
- </mock:shadow-root>
34
- </crowdsource-manager>
35
- `);
36
- });
37
- });
@@ -1,29 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newE2EPage } from "@stencil/core/testing";
22
- xdescribe('crowdsource-reporter', () => {
23
- it('renders', async () => {
24
- const page = await newE2EPage();
25
- await page.setContent('<crowdsource-reporter></crowdsource-reporter>');
26
- const element = await page.find('crowdsource-reporter');
27
- expect(element).toHaveClass('hydrated');
28
- });
29
- });
@@ -1,37 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { CrowdsourceReporter } from "../crowdsource-reporter";
23
- xdescribe('crowdsource-reporter', () => {
24
- it('renders', async () => {
25
- const page = await newSpecPage({
26
- components: [CrowdsourceReporter],
27
- html: `<crowdsource-reporter></crowdsource-reporter>`,
28
- });
29
- expect(page.root).toEqualHtml(`
30
- <crowdsource-reporter>
31
- <mock:shadow-root>
32
- <slot></slot>
33
- </mock:shadow-root>
34
- </crowdsource-reporter>
35
- `);
36
- });
37
- });
@@ -1,29 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newE2EPage } from "@stencil/core/testing";
22
- xdescribe('deduct-calculator', () => {
23
- it('renders', async () => {
24
- const page = await newE2EPage();
25
- await page.setContent('<deduct-calculator></deduct-calculator>');
26
- const element = await page.find('deduct-calculator');
27
- expect(element).toHaveClass('hydrated');
28
- });
29
- });
@@ -1,37 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- import { newSpecPage } from "@stencil/core/testing";
22
- import { DeductCalculator } from "../deduct-calculator";
23
- xdescribe('pci-calculator', () => {
24
- it('renders', async () => {
25
- const page = await newSpecPage({
26
- components: [DeductCalculator],
27
- html: `<deduct-calculator></deduct-calculator>`,
28
- });
29
- expect(page.root).toEqualHtml(`
30
- <deduct-calculator>
31
- <mock:shadow-root>
32
- <slot></slot>
33
- </mock:shadow-root>
34
- </deduct-calculator>
35
- `);
36
- });
37
- });
@@ -1,14 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import { newE2EPage } from "@stencil/core/testing";
7
- xdescribe('edit-card', () => {
8
- it('renders', async () => {
9
- const page = await newE2EPage();
10
- await page.setContent('<edit-card></edit-card>');
11
- const element = await page.find('edit-card');
12
- expect(element).toHaveClass('hydrated');
13
- });
14
- });