@esri/solutions-components 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
  2. package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
  3. package/dist/cjs/{pciUtils-6a806ba4.js → pciUtils-423cfc68.js} +25 -7
  4. package/dist/collection/demos/deduct-calculator.html +2 -5
  5. package/dist/collection/demos/new-public-notification.html +6 -4
  6. package/dist/collection/utils/pciUtils.js +25 -7
  7. package/dist/collection/utils/pciUtils.ts +30 -7
  8. package/dist/components/ExpandToggle.js +110 -0
  9. package/dist/components/Heading.js +22 -0
  10. package/dist/components/_commonjsHelpers.js +22 -0
  11. package/dist/components/action-bar.js +276 -0
  12. package/dist/components/action-group.js +149 -0
  13. package/dist/components/action-menu.js +356 -0
  14. package/dist/components/action.js +214 -0
  15. package/dist/components/add-record-modal.d.ts +11 -0
  16. package/dist/components/add-record-modal.js +171 -0
  17. package/dist/components/array.js +15 -0
  18. package/dist/components/block.js +272 -0
  19. package/dist/components/buffer-tools.d.ts +11 -0
  20. package/dist/components/buffer-tools.js +11 -0
  21. package/dist/components/buffer-tools2.js +262 -0
  22. package/dist/components/button.js +263 -0
  23. package/dist/components/calcite-accordion-item.js +244 -0
  24. package/dist/components/calcite-accordion.js +180 -0
  25. package/dist/components/calcite-action-bar.js +11 -0
  26. package/dist/components/calcite-action-group.js +11 -0
  27. package/dist/components/calcite-action-menu.js +11 -0
  28. package/dist/components/calcite-action-pad.js +197 -0
  29. package/dist/components/calcite-action.js +11 -0
  30. package/dist/components/calcite-alert.js +297 -0
  31. package/dist/components/calcite-avatar.js +182 -0
  32. package/dist/components/calcite-block-section.js +155 -0
  33. package/dist/components/calcite-block.js +11 -0
  34. package/dist/components/calcite-button.js +11 -0
  35. package/dist/components/calcite-card.js +187 -0
  36. package/dist/components/calcite-checkbox.js +11 -0
  37. package/dist/components/calcite-chip.js +11 -0
  38. package/dist/components/calcite-color-picker-hex-input.js +11 -0
  39. package/dist/components/calcite-color-picker-swatch.js +11 -0
  40. package/dist/components/calcite-color-picker.js +1036 -0
  41. package/dist/components/calcite-combobox-item-group.js +75 -0
  42. package/dist/components/calcite-combobox-item.js +11 -0
  43. package/dist/components/calcite-combobox.js +11 -0
  44. package/dist/components/calcite-date-picker-day.js +11 -0
  45. package/dist/components/calcite-date-picker-month-header.js +11 -0
  46. package/dist/components/calcite-date-picker-month.js +11 -0
  47. package/dist/components/calcite-date-picker.js +11 -0
  48. package/dist/components/calcite-dropdown-group.js +11 -0
  49. package/dist/components/calcite-dropdown-item.js +11 -0
  50. package/dist/components/calcite-dropdown.js +11 -0
  51. package/dist/components/calcite-fab.js +144 -0
  52. package/dist/components/calcite-filter.js +195 -0
  53. package/dist/components/calcite-flow-item.js +243 -0
  54. package/dist/components/calcite-flow.js +147 -0
  55. package/dist/components/calcite-graph.js +11 -0
  56. package/dist/components/calcite-handle.js +11 -0
  57. package/dist/components/calcite-icon.js +11 -0
  58. package/dist/components/calcite-inline-editable.js +294 -0
  59. package/dist/components/calcite-input-date-picker.js +713 -0
  60. package/dist/components/calcite-input-message.js +11 -0
  61. package/dist/components/calcite-input-number.js +637 -0
  62. package/dist/components/calcite-input-text.js +400 -0
  63. package/dist/components/calcite-input-time-picker.js +434 -0
  64. package/dist/components/calcite-input.js +11 -0
  65. package/dist/components/calcite-label.js +11 -0
  66. package/dist/components/calcite-link.js +11 -0
  67. package/dist/components/calcite-list-item-group.js +65 -0
  68. package/dist/components/calcite-list-item.js +11 -0
  69. package/dist/components/calcite-list.js +11 -0
  70. package/dist/components/calcite-loader.js +11 -0
  71. package/dist/components/calcite-modal.js +11 -0
  72. package/dist/components/calcite-notice.js +11 -0
  73. package/dist/components/calcite-option-group.js +64 -0
  74. package/dist/components/calcite-option.js +11 -0
  75. package/dist/components/calcite-pagination.js +258 -0
  76. package/dist/components/calcite-panel.js +11 -0
  77. package/dist/components/calcite-pick-list-group.js +74 -0
  78. package/dist/components/calcite-pick-list-item.js +11 -0
  79. package/dist/components/calcite-pick-list.js +11 -0
  80. package/dist/components/calcite-popover-manager.js +94 -0
  81. package/dist/components/calcite-popover.js +11 -0
  82. package/dist/components/calcite-progress.js +11 -0
  83. package/dist/components/calcite-radio-button-group.js +132 -0
  84. package/dist/components/calcite-radio-button.js +310 -0
  85. package/dist/components/calcite-radio-group-item.js +11 -0
  86. package/dist/components/calcite-radio-group.js +11 -0
  87. package/dist/components/calcite-rating.js +201 -0
  88. package/dist/components/calcite-scrim.js +11 -0
  89. package/dist/components/calcite-select.js +11 -0
  90. package/dist/components/calcite-shell-center-row.js +100 -0
  91. package/dist/components/calcite-shell-panel.js +11 -0
  92. package/dist/components/calcite-shell.js +11 -0
  93. package/dist/components/calcite-slider.js +11 -0
  94. package/dist/components/calcite-sortable-list.js +202 -0
  95. package/dist/components/calcite-split-button.js +11 -0
  96. package/dist/components/calcite-stepper-item.js +271 -0
  97. package/dist/components/calcite-stepper.js +256 -0
  98. package/dist/components/calcite-switch.js +11 -0
  99. package/dist/components/calcite-tab-nav.js +11 -0
  100. package/dist/components/calcite-tab-title.js +11 -0
  101. package/dist/components/calcite-tab.js +11 -0
  102. package/dist/components/calcite-tabs.js +11 -0
  103. package/dist/components/calcite-tile-select-group.js +65 -0
  104. package/dist/components/calcite-tile-select.js +266 -0
  105. package/dist/components/calcite-tile.js +11 -0
  106. package/dist/components/calcite-time-picker.js +11 -0
  107. package/dist/components/calcite-tip-group.js +41 -0
  108. package/dist/components/calcite-tip-manager.js +223 -0
  109. package/dist/components/calcite-tip.js +162 -0
  110. package/dist/components/calcite-tooltip-manager.js +57 -0
  111. package/dist/components/calcite-tooltip.js +11 -0
  112. package/dist/components/calcite-tree-item.js +11 -0
  113. package/dist/components/calcite-tree.js +11 -0
  114. package/dist/components/calcite-value-list-item.js +11 -0
  115. package/dist/components/calcite-value-list.js +11 -0
  116. package/dist/components/card-manager.d.ts +11 -0
  117. package/dist/components/card-manager.js +143 -0
  118. package/dist/components/check-list.d.ts +11 -0
  119. package/dist/components/check-list.js +11 -0
  120. package/dist/components/check-list2.js +131 -0
  121. package/dist/components/checkbox.js +165 -0
  122. package/dist/components/chip.js +170 -0
  123. package/dist/components/color-picker-hex-input.js +363 -0
  124. package/dist/components/color-picker-swatch.js +2034 -0
  125. package/dist/components/combobox-item.js +182 -0
  126. package/dist/components/combobox.js +912 -0
  127. package/dist/components/comment-card.d.ts +11 -0
  128. package/dist/components/comment-card.js +90 -0
  129. package/dist/components/conditionalSlot.js +50 -0
  130. package/dist/components/config-buffer-tools.d.ts +11 -0
  131. package/dist/components/config-buffer-tools.js +187 -0
  132. package/dist/components/config-draw-tools.d.ts +11 -0
  133. package/dist/components/config-draw-tools.js +121 -0
  134. package/dist/components/config-layer-picker.d.ts +11 -0
  135. package/dist/components/config-layer-picker.js +163 -0
  136. package/dist/components/config-pdf-download.d.ts +11 -0
  137. package/dist/components/config-pdf-download.js +154 -0
  138. package/dist/components/crowdsource-manager.d.ts +11 -0
  139. package/dist/components/crowdsource-manager.js +90 -0
  140. package/dist/components/crowdsource-reporter.d.ts +11 -0
  141. package/dist/components/crowdsource-reporter.js +90 -0
  142. package/dist/components/csvUtils.js +74 -0
  143. package/dist/components/date-picker-day.js +111 -0
  144. package/dist/components/date-picker-month-header.js +224 -0
  145. package/dist/components/date-picker-month.js +344 -0
  146. package/dist/components/date-picker.js +575 -0
  147. package/dist/components/date.js +180 -0
  148. package/dist/components/debounce.js +487 -0
  149. package/dist/components/deduct-calculator.d.ts +11 -0
  150. package/dist/components/deduct-calculator.js +11 -0
  151. package/dist/components/deduct-calculator2.js +1002 -0
  152. package/dist/components/dom.js +231 -0
  153. package/dist/components/dropdown-group.js +96 -0
  154. package/dist/components/dropdown-item.js +232 -0
  155. package/dist/components/dropdown.js +505 -0
  156. package/dist/components/edit-record-modal.d.ts +11 -0
  157. package/dist/components/edit-record-modal.js +11 -0
  158. package/dist/components/edit-record-modal2.js +161 -0
  159. package/dist/components/filter.js +763 -0
  160. package/dist/components/floating-ui.js +1768 -0
  161. package/dist/components/form.js +228 -0
  162. package/dist/components/graph.js +254 -0
  163. package/dist/components/guid.js +24 -0
  164. package/dist/components/handle.js +119 -0
  165. package/dist/components/icon.js +202 -0
  166. package/dist/components/index.d.ts +61 -0
  167. package/dist/components/index.js +196 -0
  168. package/dist/components/index2.js +199 -0
  169. package/dist/components/info-card.d.ts +11 -0
  170. package/dist/components/info-card.js +11 -0
  171. package/dist/components/info-card2.js +97 -0
  172. package/dist/components/input-message.js +101 -0
  173. package/dist/components/input.js +740 -0
  174. package/dist/components/interactive.js +51 -0
  175. package/dist/components/interfaces.js +19 -0
  176. package/dist/components/interfaces2.js +21 -0
  177. package/dist/components/interfaces3.js +80 -0
  178. package/dist/components/json-editor.d.ts +11 -0
  179. package/dist/components/json-editor.js +11 -0
  180. package/dist/components/json-editor2.js +441 -0
  181. package/dist/components/key.js +16 -0
  182. package/dist/components/label.js +106 -0
  183. package/dist/components/label2.js +131 -0
  184. package/dist/components/labelFormats.js +210 -0
  185. package/dist/components/layer-table.d.ts +11 -0
  186. package/dist/components/layer-table.js +453 -0
  187. package/dist/components/link.js +123 -0
  188. package/dist/components/list-item.d.ts +11 -0
  189. package/dist/components/list-item.js +90 -0
  190. package/dist/components/list-item2.js +149 -0
  191. package/dist/components/list.js +83 -0
  192. package/dist/components/loadModules.js +28 -0
  193. package/dist/components/loader.js +116 -0
  194. package/dist/components/locale.js +412 -0
  195. package/dist/components/locale2.js +413 -0
  196. package/dist/components/map-card.d.ts +11 -0
  197. package/dist/components/map-card.js +354 -0
  198. package/dist/components/map-draw-tools.d.ts +11 -0
  199. package/dist/components/map-draw-tools.js +11 -0
  200. package/dist/components/map-draw-tools2.js +228 -0
  201. package/dist/components/map-layer-picker.d.ts +11 -0
  202. package/dist/components/map-layer-picker.js +11 -0
  203. package/dist/components/map-layer-picker2.js +188 -0
  204. package/dist/components/map-search.d.ts +11 -0
  205. package/dist/components/map-search.js +155 -0
  206. package/dist/components/map-select-tools.d.ts +11 -0
  207. package/dist/components/map-select-tools.js +11 -0
  208. package/dist/components/map-select-tools2.js +588 -0
  209. package/dist/components/mapViewUtils.js +129 -0
  210. package/dist/components/math.js +24 -0
  211. package/dist/components/media-card.d.ts +11 -0
  212. package/dist/components/media-card.js +11 -0
  213. package/dist/components/media-card2.js +177 -0
  214. package/dist/components/modal.js +495 -0
  215. package/dist/components/nonChromiumPlatformUtils.js +503 -0
  216. package/dist/components/notice.js +192 -0
  217. package/dist/components/observers.js +56 -0
  218. package/dist/components/openCloseComponent.js +56 -0
  219. package/dist/components/option.js +109 -0
  220. package/dist/components/panel.js +459 -0
  221. package/dist/components/pci-calculator.d.ts +11 -0
  222. package/dist/components/pci-calculator.js +193 -0
  223. package/dist/components/pdf-download.d.ts +11 -0
  224. package/dist/components/pdf-download.js +11 -0
  225. package/dist/components/pdf-download2.js +189 -0
  226. package/dist/components/pick-list-item.js +255 -0
  227. package/dist/components/pick-list.js +170 -0
  228. package/dist/components/popover.js +500 -0
  229. package/dist/components/progress.js +60 -0
  230. package/dist/components/public-notification.d.ts +11 -0
  231. package/dist/components/public-notification.js +825 -0
  232. package/dist/components/publicNotificationStore.js +38 -0
  233. package/dist/components/queryUtils.js +187 -0
  234. package/dist/components/radio-group-item.js +101 -0
  235. package/dist/components/radio-group.js +235 -0
  236. package/dist/components/refine-selection-tools.d.ts +11 -0
  237. package/dist/components/refine-selection-tools.js +11 -0
  238. package/dist/components/refine-selection-tools2.js +492 -0
  239. package/dist/components/refine-selection.d.ts +11 -0
  240. package/dist/components/refine-selection.js +11 -0
  241. package/dist/components/refine-selection2.js +376 -0
  242. package/dist/components/resources.js +24 -0
  243. package/dist/components/resources2.js +21 -0
  244. package/dist/components/resources3.js +38 -0
  245. package/dist/components/scrim.js +83 -0
  246. package/dist/components/select.js +259 -0
  247. package/dist/components/shared-list-render.js +319 -0
  248. package/dist/components/shell-panel.js +281 -0
  249. package/dist/components/shell.js +121 -0
  250. package/dist/components/slider.js +896 -0
  251. package/dist/components/solution-configuration.d.ts +11 -0
  252. package/dist/components/solution-configuration.js +2233 -0
  253. package/dist/components/solution-contents.d.ts +11 -0
  254. package/dist/components/solution-contents.js +11 -0
  255. package/dist/components/solution-contents2.js +128 -0
  256. package/dist/components/solution-item-details.d.ts +11 -0
  257. package/dist/components/solution-item-details.js +11 -0
  258. package/dist/components/solution-item-details2.js +234 -0
  259. package/dist/components/solution-item-icon.d.ts +11 -0
  260. package/dist/components/solution-item-icon.js +11 -0
  261. package/dist/components/solution-item-icon2.js +342 -0
  262. package/dist/components/solution-item-sharing.d.ts +11 -0
  263. package/dist/components/solution-item-sharing.js +11 -0
  264. package/dist/components/solution-item-sharing2.js +167 -0
  265. package/dist/components/solution-item.d.ts +11 -0
  266. package/dist/components/solution-item.js +11 -0
  267. package/dist/components/solution-item2.js +315 -0
  268. package/dist/components/solution-organization-variables.d.ts +11 -0
  269. package/dist/components/solution-organization-variables.js +11 -0
  270. package/dist/components/solution-organization-variables2.js +132 -0
  271. package/dist/components/solution-resource-item.d.ts +11 -0
  272. package/dist/components/solution-resource-item.js +11 -0
  273. package/dist/components/solution-resource-item2.js +356 -0
  274. package/dist/components/solution-spatial-ref.d.ts +11 -0
  275. package/dist/components/solution-spatial-ref.js +11 -0
  276. package/dist/components/solution-spatial-ref2.js +21446 -0
  277. package/dist/components/solution-store.js +4092 -0
  278. package/dist/components/solution-template-data.d.ts +11 -0
  279. package/dist/components/solution-template-data.js +11 -0
  280. package/dist/components/solution-template-data2.js +233 -0
  281. package/dist/components/solution-variables.d.ts +11 -0
  282. package/dist/components/solution-variables.js +11 -0
  283. package/dist/components/solution-variables2.js +150 -0
  284. package/dist/components/sortable.esm.js +3026 -0
  285. package/dist/components/split-button.js +165 -0
  286. package/dist/components/store-manager.d.ts +11 -0
  287. package/dist/components/store-manager.js +83 -0
  288. package/dist/components/switch.js +139 -0
  289. package/dist/components/tab-nav.js +241 -0
  290. package/dist/components/tab-title.js +276 -0
  291. package/dist/components/tab.js +154 -0
  292. package/dist/components/tabs.js +188 -0
  293. package/dist/components/tile.js +129 -0
  294. package/dist/components/time-picker.js +943 -0
  295. package/dist/components/tooltip.js +399 -0
  296. package/dist/components/tree-item.js +294 -0
  297. package/dist/components/tree.js +327 -0
  298. package/dist/components/utils.js +119 -0
  299. package/dist/components/utils2.js +51 -0
  300. package/dist/components/value-list-item.js +204 -0
  301. package/dist/components/value-list.js +333 -0
  302. package/dist/esm/deduct-calculator.entry.js +1 -1
  303. package/dist/esm/pci-calculator.entry.js +1 -1
  304. package/dist/esm/{pciUtils-e3007a1c.js → pciUtils-ecda46e5.js} +25 -7
  305. package/dist/solutions-components/demos/deduct-calculator.html +2 -5
  306. package/dist/solutions-components/demos/new-public-notification.html +6 -4
  307. package/dist/solutions-components/{p-ff80ffbb.entry.js → p-0512635b.entry.js} +1 -1
  308. package/dist/solutions-components/{p-5ec407c2.entry.js → p-0c088725.entry.js} +1 -1
  309. package/dist/solutions-components/p-cc815aca.js +21 -0
  310. package/dist/solutions-components/solutions-components.esm.js +1 -1
  311. package/dist/solutions-components/utils/pciUtils.ts +30 -7
  312. package/dist/types/utils/pciUtils.d.ts +2 -1
  313. package/package.json +4 -3
  314. package/dist/solutions-components/p-647bbd18.js +0 -21
@@ -0,0 +1,459 @@
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 { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
7
+ import { c as getElementDir, t as toAriaBoolean } from './dom.js';
8
+ import { H as Heading } from './Heading.js';
9
+ import { S as SLOTS$1, d as defineCustomElement$5 } from './action-menu.js';
10
+ import { u as updateHostInteraction } from './interactive.js';
11
+ import { c as createObserver } from './observers.js';
12
+ import { d as defineCustomElement$6 } from './action.js';
13
+ import { d as defineCustomElement$4 } from './icon.js';
14
+ import { d as defineCustomElement$3 } from './loader.js';
15
+ import { d as defineCustomElement$2 } from './popover.js';
16
+ import { d as defineCustomElement$1 } from './scrim.js';
17
+
18
+ /*!
19
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
20
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
21
+ * v1.0.0-beta.97
22
+ */
23
+ const CSS = {
24
+ backButton: "back-button",
25
+ container: "container",
26
+ header: "header",
27
+ heading: "heading",
28
+ summary: "summary",
29
+ description: "description",
30
+ headerContent: "header-content",
31
+ headerActions: "header-actions",
32
+ headerActionsEnd: "header-actions--end",
33
+ headerActionsStart: "header-actions--start",
34
+ contentWrapper: "content-wrapper",
35
+ contentContainer: "content-container",
36
+ contentHeight: "content-height",
37
+ fabContainer: "fab-container",
38
+ footer: "footer"
39
+ };
40
+ const ICONS = {
41
+ close: "x",
42
+ menu: "ellipsis",
43
+ backLeft: "chevron-left",
44
+ backRight: "chevron-right"
45
+ };
46
+ const SLOTS = {
47
+ headerActionsStart: "header-actions-start",
48
+ headerActionsEnd: "header-actions-end",
49
+ headerMenuActions: "header-menu-actions",
50
+ headerContent: "header-content",
51
+ fab: "fab",
52
+ footer: "footer",
53
+ footerActions: "footer-actions"
54
+ };
55
+ const TEXT = {
56
+ back: "Back",
57
+ close: "Close",
58
+ open: "Open",
59
+ options: "Options"
60
+ };
61
+ const HEADING_LEVEL = 3;
62
+
63
+ const panelCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-min-header-height:calc(var(--calcite-icon-size) * 3);--calcite-panel-max-height:unset;--calcite-panel-width:100%;--calcite-panel-min-width:unset;--calcite-panel-max-width:unset}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.header{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:0.5rem}.container{margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;background-color:var(--calcite-ui-background);padding:0px;max-block-size:var(--calcite-panel-max-height);inline-size:var(--calcite-panel-width);max-inline-size:var(--calcite-panel-max-width);min-inline-size:var(--calcite-panel-min-width);transition:max-block-size var(--calcite-animation-timing), inline-size var(--calcite-animation-timing)}:host([height-scale=s]){--calcite-panel-max-height:40vh}:host([height-scale=m]){--calcite-panel-max-height:60vh}:host([height-scale=l]){--calcite-panel-max-height:80vh}:host([width-scale=s]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 12vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 300px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 150px)}:host([width-scale=m]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 20vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 420px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 240px)}:host([width-scale=l]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 45vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 680px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 340px)}.container[hidden]{display:none}.header{-webkit-border-after:1px solid;border-block-end:1px solid;position:sticky;inset-block-start:0px;z-index:400;inline-size:100%;align-items:stretch;justify-content:flex-start;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3);flex:0 0 auto}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:0.75rem;padding-block:0.875rem;-webkit-margin-end:auto;margin-inline-end:auto}.header-content .heading,.header-content .description{display:block;overflow-wrap:break-word;padding:0px}.header-content .heading{margin-inline:0px;margin-block:0px 0.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-medium)}.header-content .heading:only-child{-webkit-margin-after:0px;margin-block-end:0px}.header-content .description{font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}.header-actions--end{-webkit-margin-start:auto;margin-inline-start:auto}.content-wrapper{overflow:auto}.content-height{block-size:100%}.content-container{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;background-color:var(--calcite-ui-background)}.footer{-webkit-border-before:1px solid;border-block-start:1px solid;position:sticky;inset-block-end:0px;display:flex;inline-size:100%;justify-content:space-evenly;background-color:var(--calcite-ui-foreground-1);border-block-start-color:var(--calcite-ui-border-3);flex:0 0 auto;min-block-size:3rem;padding:0.5rem}.fab-container{position:sticky;inset-block-end:0px;z-index:300;margin-block:0px;margin-inline:auto;display:block;padding:0.5rem;inset-inline:0;inline-size:-moz-fit-content;inline-size:fit-content}[hidden]{display:none}";
64
+
65
+ const Panel = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
66
+ constructor() {
67
+ super();
68
+ this.__registerHost();
69
+ this.__attachShadow();
70
+ this.calcitePanelClose = createEvent(this, "calcitePanelClose", 6);
71
+ this.calcitePanelDismiss = createEvent(this, "calcitePanelDismiss", 6);
72
+ this.calcitePanelDismissedChange = createEvent(this, "calcitePanelDismissedChange", 6);
73
+ this.calcitePanelScroll = createEvent(this, "calcitePanelScroll", 6);
74
+ this.calcitePanelBackClick = createEvent(this, "calcitePanelBackClick", 6);
75
+ // --------------------------------------------------------------------------
76
+ //
77
+ // Properties
78
+ //
79
+ // --------------------------------------------------------------------------
80
+ /**
81
+ * When `true`, hides the component.
82
+ *
83
+ * @deprecated use `closed` instead.
84
+ */
85
+ this.dismissed = false;
86
+ /** When `true`, the component will be hidden. */
87
+ this.closed = false;
88
+ /**
89
+ * When `true`, interaction is prevented and the component is displayed with lower opacity.
90
+ */
91
+ this.disabled = false;
92
+ /**
93
+ * When `true`, a close button is added to the component.
94
+ *
95
+ * @deprecated use `closable` instead
96
+ */
97
+ this.dismissible = false;
98
+ /** When `true`, displays a close button in the trailing side of the header. */
99
+ this.closable = false;
100
+ /**
101
+ * When `true`, displays a back button in the header.
102
+ *
103
+ * @deprecated use `calcite-flow-item` instead.
104
+ */
105
+ this.showBackButton = false;
106
+ /**
107
+ * When `true`, a busy indicator is displayed.
108
+ */
109
+ this.loading = false;
110
+ /**
111
+ * When `true`, the action menu items in the `header-menu-actions` slot are open.
112
+ */
113
+ this.menuOpen = false;
114
+ this.resizeObserver = createObserver("resize", () => this.resizeHandler());
115
+ this.hasStartActions = false;
116
+ this.hasEndActions = false;
117
+ this.hasMenuItems = false;
118
+ this.hasHeaderContent = false;
119
+ this.hasFooterContent = false;
120
+ this.hasFooterActions = false;
121
+ this.hasFab = false;
122
+ // --------------------------------------------------------------------------
123
+ //
124
+ // Private Methods
125
+ //
126
+ // --------------------------------------------------------------------------
127
+ this.resizeHandler = () => {
128
+ const { panelScrollEl } = this;
129
+ if (!panelScrollEl ||
130
+ typeof panelScrollEl.scrollHeight !== "number" ||
131
+ typeof panelScrollEl.offsetHeight !== "number") {
132
+ return;
133
+ }
134
+ panelScrollEl.tabIndex = panelScrollEl.scrollHeight > panelScrollEl.offsetHeight ? 0 : -1;
135
+ };
136
+ this.setContainerRef = (node) => {
137
+ this.containerEl = node;
138
+ };
139
+ this.setCloseRef = (node) => {
140
+ this.closeButtonEl = node;
141
+ };
142
+ this.setBackRef = (node) => {
143
+ this.backButtonEl = node;
144
+ };
145
+ this.panelKeyDownHandler = (event) => {
146
+ if (this.closable && event.key === "Escape" && !event.defaultPrevented) {
147
+ this.close();
148
+ event.preventDefault();
149
+ }
150
+ };
151
+ this.close = () => {
152
+ this.closed = true;
153
+ this.calcitePanelDismiss.emit();
154
+ this.calcitePanelClose.emit();
155
+ };
156
+ this.panelScrollHandler = () => {
157
+ this.calcitePanelScroll.emit();
158
+ };
159
+ this.backButtonClick = () => {
160
+ this.calcitePanelBackClick.emit();
161
+ };
162
+ this.handleHeaderActionsStartSlotChange = (event) => {
163
+ const elements = event.target.assignedElements({
164
+ flatten: true
165
+ });
166
+ this.hasStartActions = !!elements.length;
167
+ };
168
+ this.handleHeaderActionsEndSlotChange = (event) => {
169
+ const elements = event.target.assignedElements({
170
+ flatten: true
171
+ });
172
+ this.hasEndActions = !!elements.length;
173
+ };
174
+ this.handleHeaderMenuActionsSlotChange = (event) => {
175
+ const elements = event.target.assignedElements({
176
+ flatten: true
177
+ });
178
+ this.hasMenuItems = !!elements.length;
179
+ };
180
+ this.handleHeaderContentSlotChange = (event) => {
181
+ const elements = event.target.assignedElements({
182
+ flatten: true
183
+ });
184
+ this.hasHeaderContent = !!elements.length;
185
+ };
186
+ this.handleFooterSlotChange = (event) => {
187
+ const elements = event.target.assignedElements({
188
+ flatten: true
189
+ });
190
+ this.hasFooterContent = !!elements.length;
191
+ };
192
+ this.handleFooterActionsSlotChange = (event) => {
193
+ const elements = event.target.assignedElements({
194
+ flatten: true
195
+ });
196
+ this.hasFooterActions = !!elements.length;
197
+ };
198
+ this.handleFabSlotChange = (event) => {
199
+ const elements = event.target.assignedElements({
200
+ flatten: true
201
+ });
202
+ this.hasFab = !!elements.length;
203
+ };
204
+ this.setPanelScrollEl = (el) => {
205
+ var _a, _b;
206
+ this.panelScrollEl = el;
207
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
208
+ if (el) {
209
+ (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(el);
210
+ this.resizeHandler();
211
+ }
212
+ };
213
+ }
214
+ dismissedHandler(value) {
215
+ this.closed = value;
216
+ this.calcitePanelDismissedChange.emit();
217
+ }
218
+ closedHandler(value) {
219
+ this.dismissed = value;
220
+ }
221
+ dismissibleHandler(value) {
222
+ this.closable = value;
223
+ }
224
+ closableHandler(value) {
225
+ this.dismissible = value;
226
+ }
227
+ //--------------------------------------------------------------------------
228
+ //
229
+ // Lifecycle
230
+ //
231
+ //--------------------------------------------------------------------------
232
+ componentDidRender() {
233
+ updateHostInteraction(this);
234
+ }
235
+ // --------------------------------------------------------------------------
236
+ //
237
+ // Lifecycle
238
+ //
239
+ // --------------------------------------------------------------------------
240
+ connectedCallback() {
241
+ const isClosed = this.dismissed || this.closed;
242
+ const isClosable = this.dismissible || this.closable;
243
+ if (isClosed) {
244
+ this.dismissedHandler(isClosed);
245
+ this.closedHandler(isClosed);
246
+ }
247
+ if (isClosable) {
248
+ this.dismissibleHandler(isClosable);
249
+ this.closableHandler(isClosable);
250
+ }
251
+ }
252
+ disconnectedCallback() {
253
+ var _a;
254
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
255
+ }
256
+ // --------------------------------------------------------------------------
257
+ //
258
+ // Methods
259
+ //
260
+ // --------------------------------------------------------------------------
261
+ /**
262
+ * Sets focus on the component.
263
+ *
264
+ * @param focusId
265
+ */
266
+ async setFocus(focusId) {
267
+ const { backButtonEl, closeButtonEl, containerEl } = this;
268
+ if (focusId === "back-button") {
269
+ backButtonEl === null || backButtonEl === void 0 ? void 0 : backButtonEl.setFocus();
270
+ return;
271
+ }
272
+ if (focusId === "dismiss-button") {
273
+ closeButtonEl === null || closeButtonEl === void 0 ? void 0 : closeButtonEl.setFocus();
274
+ return;
275
+ }
276
+ if (backButtonEl) {
277
+ backButtonEl.setFocus();
278
+ return;
279
+ }
280
+ if (closeButtonEl) {
281
+ closeButtonEl.setFocus();
282
+ return;
283
+ }
284
+ containerEl === null || containerEl === void 0 ? void 0 : containerEl.focus();
285
+ }
286
+ /**
287
+ * Scrolls the component's content to a specified set of coordinates.
288
+ *
289
+ * @example
290
+ * myCalciteFlowItem.scrollContentTo({
291
+ * left: 0, // Specifies the number of pixels along the X axis to scroll the window or element.
292
+ * top: 0, // Specifies the number of pixels along the Y axis to scroll the window or element
293
+ * behavior: "auto" // Specifies whether the scrolling should animate smoothly (smooth), or happen instantly in a single jump (auto, the default value).
294
+ * });
295
+ * @param options
296
+ */
297
+ async scrollContentTo(options) {
298
+ var _a;
299
+ (_a = this.panelScrollEl) === null || _a === void 0 ? void 0 : _a.scrollTo(options);
300
+ }
301
+ // --------------------------------------------------------------------------
302
+ //
303
+ // Render Methods
304
+ //
305
+ // --------------------------------------------------------------------------
306
+ renderBackButton() {
307
+ const { el } = this;
308
+ const rtl = getElementDir(el) === "rtl";
309
+ const { showBackButton, intlBack, backButtonClick } = this;
310
+ const label = intlBack || TEXT.back;
311
+ const icon = rtl ? ICONS.backRight : ICONS.backLeft;
312
+ return showBackButton ? (h("calcite-action", { "aria-label": label, class: CSS.backButton, icon: icon, key: "back-button", onClick: backButtonClick, ref: this.setBackRef, scale: "s", slot: SLOTS.headerActionsStart, text: label })) : null;
313
+ }
314
+ renderHeaderContent() {
315
+ const { heading, headingLevel, summary, description, hasHeaderContent } = this;
316
+ const headingNode = heading ? (h(Heading, { class: CSS.heading, level: headingLevel || HEADING_LEVEL }, heading)) : null;
317
+ const descriptionNode = description || summary ? h("span", { class: CSS.description }, description || summary) : null;
318
+ return !hasHeaderContent && (headingNode || descriptionNode) ? (h("div", { class: CSS.headerContent, key: "header-content" }, headingNode, descriptionNode)) : null;
319
+ }
320
+ /**
321
+ * Allows user to override the entire header-content node.
322
+ */
323
+ renderHeaderSlottedContent() {
324
+ return (h("div", { class: CSS.headerContent, hidden: !this.hasHeaderContent, key: "slotted-header-content" }, h("slot", { name: SLOTS.headerContent, onSlotchange: this.handleHeaderContentSlotChange })));
325
+ }
326
+ renderHeaderStartActions() {
327
+ const { hasStartActions } = this;
328
+ return (h("div", { class: { [CSS.headerActionsStart]: true, [CSS.headerActions]: true }, hidden: !hasStartActions, key: "header-actions-start" }, h("slot", { name: SLOTS.headerActionsStart, onSlotchange: this.handleHeaderActionsStartSlotChange })));
329
+ }
330
+ renderHeaderActionsEnd() {
331
+ const { close, hasEndActions, intlClose, closable } = this;
332
+ const text = intlClose || TEXT.close;
333
+ const closableNode = closable ? (h("calcite-action", { "aria-label": text, icon: ICONS.close, onClick: close, ref: this.setCloseRef, text: text })) : null;
334
+ const slotNode = (h("slot", { name: SLOTS.headerActionsEnd, onSlotchange: this.handleHeaderActionsEndSlotChange }));
335
+ const showContainer = hasEndActions || closableNode;
336
+ return (h("div", { class: { [CSS.headerActionsEnd]: true, [CSS.headerActions]: true }, hidden: !showContainer, key: "header-actions-end" }, slotNode, closableNode));
337
+ }
338
+ renderMenu() {
339
+ const { hasMenuItems, intlOptions, menuOpen } = this;
340
+ return (h("calcite-action-menu", { flipPlacements: ["top", "bottom"], hidden: !hasMenuItems, key: "menu", label: intlOptions || TEXT.options, open: menuOpen, placement: "bottom-end" }, h("calcite-action", { icon: ICONS.menu, slot: SLOTS$1.trigger, text: intlOptions || TEXT.options }), h("slot", { name: SLOTS.headerMenuActions, onSlotchange: this.handleHeaderMenuActionsSlotChange })));
341
+ }
342
+ renderHeaderNode() {
343
+ const { showBackButton, hasHeaderContent, hasStartActions, hasEndActions, closable, hasMenuItems } = this;
344
+ const headerContentNode = this.renderHeaderContent();
345
+ const showHeader = showBackButton ||
346
+ hasHeaderContent ||
347
+ headerContentNode ||
348
+ hasStartActions ||
349
+ hasEndActions ||
350
+ closable ||
351
+ hasMenuItems;
352
+ return (h("header", { class: CSS.header, hidden: !showHeader }, this.renderBackButton(), this.renderHeaderStartActions(), this.renderHeaderSlottedContent(), headerContentNode, this.renderHeaderActionsEnd(), this.renderMenu()));
353
+ }
354
+ renderFooterNode() {
355
+ const { hasFooterContent, hasFooterActions } = this;
356
+ const showFooter = hasFooterContent || hasFooterActions;
357
+ return (h("footer", { class: CSS.footer, hidden: !showFooter }, h("slot", { key: "footer-slot", name: SLOTS.footer, onSlotchange: this.handleFooterSlotChange }), h("slot", { key: "footer-actions-slot", name: SLOTS.footerActions, onSlotchange: this.handleFooterActionsSlotChange })));
358
+ }
359
+ renderContent() {
360
+ const { hasFab } = this;
361
+ const defaultSlotNode = h("slot", { key: "default-slot" });
362
+ const containerNode = hasFab ? (h("section", { class: CSS.contentContainer }, defaultSlotNode)) : (defaultSlotNode);
363
+ return (h("div", { class: {
364
+ [CSS.contentWrapper]: true,
365
+ [CSS.contentContainer]: !hasFab,
366
+ [CSS.contentHeight]: hasFab
367
+ }, onScroll: this.panelScrollHandler, ref: this.setPanelScrollEl }, containerNode, this.renderFab()));
368
+ }
369
+ renderFab() {
370
+ return (h("div", { class: CSS.fabContainer, hidden: !this.hasFab }, h("slot", { name: SLOTS.fab, onSlotchange: this.handleFabSlotChange })));
371
+ }
372
+ render() {
373
+ const { loading, panelKeyDownHandler, closed, closable } = this;
374
+ const panelNode = (h("article", { "aria-busy": toAriaBoolean(loading), class: CSS.container, hidden: closed, onKeyDown: panelKeyDownHandler, ref: this.setContainerRef, tabIndex: closable ? 0 : -1 }, this.renderHeaderNode(), this.renderContent(), this.renderFooterNode()));
375
+ return (h(Fragment, null, loading ? h("calcite-scrim", { loading: loading }) : null, panelNode));
376
+ }
377
+ get el() { return this; }
378
+ static get watchers() { return {
379
+ "dismissed": ["dismissedHandler"],
380
+ "closed": ["closedHandler"],
381
+ "dismissible": ["dismissibleHandler"],
382
+ "closable": ["closableHandler"]
383
+ }; }
384
+ static get style() { return panelCss; }
385
+ }, [1, "calcite-panel", {
386
+ "dismissed": [1540],
387
+ "closed": [1540],
388
+ "beforeBack": [16],
389
+ "disabled": [516],
390
+ "dismissible": [1540],
391
+ "closable": [1540],
392
+ "headingLevel": [514, "heading-level"],
393
+ "showBackButton": [516, "show-back-button"],
394
+ "intlBack": [1, "intl-back"],
395
+ "heightScale": [513, "height-scale"],
396
+ "widthScale": [513, "width-scale"],
397
+ "loading": [516],
398
+ "intlClose": [1, "intl-close"],
399
+ "intlOptions": [1, "intl-options"],
400
+ "heading": [1],
401
+ "summary": [1],
402
+ "description": [1],
403
+ "menuOpen": [516, "menu-open"],
404
+ "hasStartActions": [32],
405
+ "hasEndActions": [32],
406
+ "hasMenuItems": [32],
407
+ "hasHeaderContent": [32],
408
+ "hasFooterContent": [32],
409
+ "hasFooterActions": [32],
410
+ "hasFab": [32],
411
+ "setFocus": [64],
412
+ "scrollContentTo": [64]
413
+ }]);
414
+ function defineCustomElement() {
415
+ if (typeof customElements === "undefined") {
416
+ return;
417
+ }
418
+ const components = ["calcite-panel", "calcite-action", "calcite-action-menu", "calcite-icon", "calcite-loader", "calcite-popover", "calcite-scrim"];
419
+ components.forEach(tagName => { switch (tagName) {
420
+ case "calcite-panel":
421
+ if (!customElements.get(tagName)) {
422
+ customElements.define(tagName, Panel);
423
+ }
424
+ break;
425
+ case "calcite-action":
426
+ if (!customElements.get(tagName)) {
427
+ defineCustomElement$6();
428
+ }
429
+ break;
430
+ case "calcite-action-menu":
431
+ if (!customElements.get(tagName)) {
432
+ defineCustomElement$5();
433
+ }
434
+ break;
435
+ case "calcite-icon":
436
+ if (!customElements.get(tagName)) {
437
+ defineCustomElement$4();
438
+ }
439
+ break;
440
+ case "calcite-loader":
441
+ if (!customElements.get(tagName)) {
442
+ defineCustomElement$3();
443
+ }
444
+ break;
445
+ case "calcite-popover":
446
+ if (!customElements.get(tagName)) {
447
+ defineCustomElement$2();
448
+ }
449
+ break;
450
+ case "calcite-scrim":
451
+ if (!customElements.get(tagName)) {
452
+ defineCustomElement$1();
453
+ }
454
+ break;
455
+ } });
456
+ }
457
+ defineCustomElement();
458
+
459
+ export { Panel as P, SLOTS as S, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface PciCalculator extends Components.PciCalculator, HTMLElement {}
4
+ export const PciCalculator: {
5
+ prototype: PciCalculator;
6
+ new (): PciCalculator;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,193 @@
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 { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
7
+ import { c as calculatePCI, d as defineCustomElement$2 } from './deduct-calculator2.js';
8
+ import { d as defineCustomElement$b } from './action.js';
9
+ import { d as defineCustomElement$a } from './button.js';
10
+ import { d as defineCustomElement$9 } from './icon.js';
11
+ import { d as defineCustomElement$8 } from './input.js';
12
+ import { d as defineCustomElement$7 } from './label.js';
13
+ import { d as defineCustomElement$6 } from './loader.js';
14
+ import { d as defineCustomElement$5 } from './option.js';
15
+ import { d as defineCustomElement$4 } from './progress.js';
16
+ import { d as defineCustomElement$3 } from './select.js';
17
+
18
+ const pciCalculatorCss = ":host{display:block;--calcite-label-margin-bottom:0}.label-display{display:block;padding-bottom:1rem}.display-flex{display:flex}.display-grid{display:grid}.display-table{display:table}.display-inline-table{display:inline-table}.display-none{display:none}.display-inherit{display:inherit}.padding-top-1{padding-top:1rem}.main-input{width:300px;-webkit-padding-end:1rem;padding-inline-end:1rem}.float-end{float:inline-end}.position-relative{position:relative}.position-right{position:absolute;right:0px}";
19
+
20
+ const PciCalculator$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
21
+ constructor() {
22
+ super();
23
+ this.__registerHost();
24
+ this.__attachShadow();
25
+ this.showAddDeduct = false;
26
+ }
27
+ //--------------------------------------------------------------------------
28
+ //
29
+ // Watch handlers
30
+ //
31
+ //--------------------------------------------------------------------------
32
+ //--------------------------------------------------------------------------
33
+ //
34
+ // Methods (public)
35
+ //
36
+ //--------------------------------------------------------------------------
37
+ //--------------------------------------------------------------------------
38
+ //
39
+ // Events (public)
40
+ //
41
+ //--------------------------------------------------------------------------
42
+ //--------------------------------------------------------------------------
43
+ //
44
+ // Functions (lifecycle)
45
+ //
46
+ //--------------------------------------------------------------------------
47
+ /**
48
+ * Renders the component.
49
+ */
50
+ render() {
51
+ const pciClass = !this.showAddDeduct ? "display-grid" : "display-none";
52
+ const deductClass = this.showAddDeduct ? "position-relative" : "display-none";
53
+ return (h(Host, null, h("div", { class: pciClass }, h("div", { class: "label-display" }, h("calcite-label", { class: "label-display" }, "Enter comma delimited deduct values", this._getDeductValuesInput())), h("div", null, this._getCalculateButton())), h("div", { class: deductClass }, h("div", { class: "position-right" }, h("calcite-action", { appearance: 'clear', class: "float-end", icon: "x", onClick: () => this._toggleShowAddDeduct(), scale: "s", text: '' })), h("deduct-calculator", { class: "display-grid padding-top-1", onDeductValueComplete: (evt) => this._addDeductValue(evt) }))));
54
+ }
55
+ //--------------------------------------------------------------------------
56
+ //
57
+ // Functions (protected)
58
+ //
59
+ //--------------------------------------------------------------------------
60
+ /**
61
+ * Load the calculate deduct values calculate UI
62
+ *
63
+ * @returns calculate deduct value UI node
64
+ *
65
+ * @protected
66
+ */
67
+ _getDeductValuesInput() {
68
+ return (h("div", { class: "display-flex" }, h("calcite-input", { class: "main-input", ref: (el) => { this._deductValuesElement = el; } }), h("calcite-action", { appearance: 'clear', icon: "plus-circle", onClick: () => this._toggleShowAddDeduct(), scale: "s", text: '' })));
69
+ }
70
+ /**
71
+ * Add the calculate PCI button
72
+ *
73
+ * @returns calculate PCI button
74
+ *
75
+ * @protected
76
+ */
77
+ _getCalculateButton() {
78
+ return (h("calcite-button", { onClick: () => this._calculatePCI(this._deductValuesElement.value) }, "Calculate PCI"));
79
+ }
80
+ /**
81
+ * Toggle the value that controls show/hide of the deduct value UI
82
+ *
83
+ * @protected
84
+ */
85
+ _toggleShowAddDeduct() {
86
+ this.showAddDeduct = !this.showAddDeduct;
87
+ }
88
+ /**
89
+ * Hide the calculate deduct value UI and add the newly calculated value
90
+ *
91
+ * @param event the event from the calculate deduct value control
92
+ *
93
+ * @protected
94
+ */
95
+ _addDeductValue(evt) {
96
+ this._toggleShowAddDeduct();
97
+ this._deductValuesElement.value += Math.abs(parseFloat(this._deductValuesElement.value)) > 0 ? `,${evt.detail}` : evt.detail;
98
+ }
99
+ /**
100
+ * Calculate the PCI value based on the ASTM methodology
101
+ *
102
+ * @param deductValuesString string with comma delimited numbers
103
+ * Survery123 does not accept array type arguments for passing to scripts.
104
+ * The string will be parsed within the script that will be consumed by Survey123
105
+ *
106
+ * @protected
107
+ */
108
+ _calculatePCI(deductValuesString) {
109
+ const pci = calculatePCI(deductValuesString, true);
110
+ const rating = pci <= 10 ? "Failed" :
111
+ pci <= 25 ? "Serious" :
112
+ pci <= 40 ? "Very Poor" :
113
+ pci <= 55 ? "Poor" :
114
+ pci <= 70 ? "Fair" :
115
+ pci <= 85 ? "Satisfactory" : "Good";
116
+ console.log(`PCI: ${pci}`);
117
+ console.log(`Rating: ${rating}`);
118
+ alert("See debug console for results");
119
+ }
120
+ get el() { return this; }
121
+ static get style() { return pciCalculatorCss; }
122
+ }, [1, "pci-calculator", {
123
+ "showAddDeduct": [32]
124
+ }]);
125
+ function defineCustomElement$1() {
126
+ if (typeof customElements === "undefined") {
127
+ return;
128
+ }
129
+ const components = ["pci-calculator", "calcite-action", "calcite-button", "calcite-icon", "calcite-input", "calcite-label", "calcite-loader", "calcite-option", "calcite-progress", "calcite-select", "deduct-calculator"];
130
+ components.forEach(tagName => { switch (tagName) {
131
+ case "pci-calculator":
132
+ if (!customElements.get(tagName)) {
133
+ customElements.define(tagName, PciCalculator$1);
134
+ }
135
+ break;
136
+ case "calcite-action":
137
+ if (!customElements.get(tagName)) {
138
+ defineCustomElement$b();
139
+ }
140
+ break;
141
+ case "calcite-button":
142
+ if (!customElements.get(tagName)) {
143
+ defineCustomElement$a();
144
+ }
145
+ break;
146
+ case "calcite-icon":
147
+ if (!customElements.get(tagName)) {
148
+ defineCustomElement$9();
149
+ }
150
+ break;
151
+ case "calcite-input":
152
+ if (!customElements.get(tagName)) {
153
+ defineCustomElement$8();
154
+ }
155
+ break;
156
+ case "calcite-label":
157
+ if (!customElements.get(tagName)) {
158
+ defineCustomElement$7();
159
+ }
160
+ break;
161
+ case "calcite-loader":
162
+ if (!customElements.get(tagName)) {
163
+ defineCustomElement$6();
164
+ }
165
+ break;
166
+ case "calcite-option":
167
+ if (!customElements.get(tagName)) {
168
+ defineCustomElement$5();
169
+ }
170
+ break;
171
+ case "calcite-progress":
172
+ if (!customElements.get(tagName)) {
173
+ defineCustomElement$4();
174
+ }
175
+ break;
176
+ case "calcite-select":
177
+ if (!customElements.get(tagName)) {
178
+ defineCustomElement$3();
179
+ }
180
+ break;
181
+ case "deduct-calculator":
182
+ if (!customElements.get(tagName)) {
183
+ defineCustomElement$2();
184
+ }
185
+ break;
186
+ } });
187
+ }
188
+ defineCustomElement$1();
189
+
190
+ const PciCalculator = PciCalculator$1;
191
+ const defineCustomElement = defineCustomElement$1;
192
+
193
+ export { PciCalculator, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface PdfDownload extends Components.PdfDownload, HTMLElement {}
4
+ export const PdfDownload: {
5
+ prototype: PdfDownload;
6
+ new (): PdfDownload;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;