@duetds/components 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hydrate/index.js +145 -81
- package/lib/cjs/{dom-66424ef2.js → dom-96576bce.js} +1 -1
- package/lib/cjs/duet-action-button.cjs.entry.js +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
- package/lib/cjs/duet-card.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
- package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +4 -3
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +1 -1
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +1 -1
- package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-modal.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +92 -47
- package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-progress.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +3 -3
- package/lib/cjs/{focus-utils-bfb10d32.js → focus-utils-7b09fa4b.js} +1 -1
- package/lib/cjs/{index-a4844346.js → index-3024eb44.js} +11 -9
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/cjs/{shadow-css-1ff2f74f.js → shadow-css-38b9e725.js} +2 -3
- package/lib/collection/collection-manifest.json +1 -1
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +2 -1
- package/lib/collection/components/duet-number-input/duet-number-input.js +22 -27
- package/lib/collection/components/duet-table/duet-table.css +30 -18
- package/lib/collection/utils/math.utils.js +76 -0
- package/lib/custom-elements-bundle/index.js +106 -61
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-d33b5ac5.system.entry.js → p-036b2f99.system.entry.js} +1 -1
- package/lib/duet/p-0522338d.system.entry.js +4 -0
- package/lib/duet/{p-ec6d63fc.entry.js → p-053c3751.entry.js} +1 -1
- package/lib/duet/{p-285714dd.entry.js → p-094b206c.entry.js} +1 -1
- package/lib/duet/{p-e8f8374b.system.entry.js → p-095b52f8.system.entry.js} +1 -1
- package/lib/duet/{p-7021d0c6.system.entry.js → p-0f343566.system.entry.js} +1 -1
- package/lib/duet/{p-03b6ce80.entry.js → p-0fffc5fe.entry.js} +1 -1
- package/lib/duet/{p-b35d6368.system.entry.js → p-1167bc0a.system.entry.js} +1 -1
- package/lib/duet/{p-fd0a3ab7.entry.js → p-13db05ed.entry.js} +1 -1
- package/lib/duet/p-15edabe0.entry.js +4 -0
- package/lib/duet/{p-c7657242.entry.js → p-16a1bfe4.entry.js} +1 -1
- package/lib/duet/{p-b0a4dc6d.entry.js → p-273b6543.entry.js} +1 -1
- package/lib/duet/{p-5b1cbe5b.entry.js → p-27d9b918.entry.js} +1 -1
- package/lib/duet/{p-e75c7aa8.system.entry.js → p-2cc240f9.system.entry.js} +1 -1
- package/lib/duet/{p-971f42d6.system.entry.js → p-2ee81c0d.system.entry.js} +1 -1
- package/lib/duet/{p-0bee3151.system.entry.js → p-31a56879.system.entry.js} +1 -1
- package/lib/duet/p-35f011bf.system.js +5 -0
- package/lib/duet/{p-fa59ebf4.js → p-3b31184e.js} +0 -0
- package/lib/duet/{p-9406ee60.entry.js → p-4061e958.entry.js} +1 -1
- package/lib/duet/{p-08eb2200.entry.js → p-40ebab42.entry.js} +1 -1
- package/lib/duet/{p-f91e88e3.system.entry.js → p-465777cf.system.entry.js} +1 -1
- package/lib/duet/{p-a2fa0049.entry.js → p-484993a3.entry.js} +1 -1
- package/lib/duet/{p-9920ad3b.entry.js → p-49fc4668.entry.js} +1 -1
- package/lib/duet/{p-b51928dc.system.entry.js → p-4e2d8044.system.entry.js} +1 -1
- package/lib/duet/{p-95e1a336.entry.js → p-4ff48b81.entry.js} +1 -1
- package/lib/duet/{p-423d4211.system.entry.js → p-50f27bbf.system.entry.js} +1 -1
- package/lib/duet/{p-0ae816ee.entry.js → p-5183d420.entry.js} +1 -1
- package/lib/duet/{p-88ffd1cc.entry.js → p-536bde7b.entry.js} +1 -1
- package/lib/duet/{p-360f8fff.system.entry.js → p-53b8ff1e.system.entry.js} +1 -1
- package/lib/duet/{p-01478a01.system.entry.js → p-55a7c445.system.entry.js} +1 -1
- package/lib/duet/{p-00bf0bb9.system.entry.js → p-56d12aca.system.entry.js} +1 -1
- package/lib/duet/{p-030e20d7.entry.js → p-60ef49b0.entry.js} +1 -1
- package/lib/duet/{p-6a843f9e.entry.js → p-6518b98d.entry.js} +1 -1
- package/lib/duet/{p-98039227.system.entry.js → p-69180d4f.system.entry.js} +1 -1
- package/lib/duet/{p-c1d55269.system.entry.js → p-6e02a236.system.entry.js} +1 -1
- package/lib/duet/{p-495a1326.system.entry.js → p-6ed460f4.system.entry.js} +1 -1
- package/lib/duet/{p-73cd4f03.system.entry.js → p-720c6e22.system.entry.js} +1 -1
- package/lib/duet/{p-a843e579.system.entry.js → p-74e56aba.system.entry.js} +1 -1
- package/lib/duet/{p-fbec1a47.entry.js → p-750330d5.entry.js} +1 -1
- package/lib/duet/{p-f5613315.system.entry.js → p-76263b65.system.entry.js} +1 -1
- package/lib/duet/{p-271107d8.entry.js → p-76c11fd4.entry.js} +1 -1
- package/lib/duet/{p-4972c76e.system.js → p-798355c8.system.js} +1 -1
- package/lib/duet/{p-ee97a406.system.entry.js → p-7bf7db59.system.entry.js} +2 -2
- package/lib/duet/{p-19100783.system.entry.js → p-7e951645.system.entry.js} +1 -1
- package/lib/duet/p-7ed17661.entry.js +4 -0
- package/lib/duet/{p-56d3e64f.entry.js → p-7ef5c9a5.entry.js} +1 -1
- package/lib/duet/{p-33388bf3.system.entry.js → p-7f984c27.system.entry.js} +1 -1
- package/lib/duet/{p-1ff51ad8.system.entry.js → p-85be7c9f.system.entry.js} +1 -1
- package/lib/duet/{p-fef3a403.system.entry.js → p-867497c7.system.entry.js} +1 -1
- package/lib/duet/{p-95a0db46.entry.js → p-869a8af0.entry.js} +1 -1
- package/lib/duet/{p-04061cef.entry.js → p-8714d15d.entry.js} +1 -1
- package/lib/duet/{p-9496d6d4.entry.js → p-876175fe.entry.js} +1 -1
- package/lib/duet/{p-7fe67436.system.entry.js → p-88113f53.system.entry.js} +1 -1
- package/lib/duet/{p-d4dba079.system.entry.js → p-8828fc2e.system.entry.js} +1 -1
- package/lib/duet/{p-5a5d8fb1.entry.js → p-88996447.entry.js} +1 -1
- package/lib/duet/p-8de3ea21.system.entry.js +4 -0
- package/lib/duet/{p-64685397.entry.js → p-8e9cbd88.entry.js} +1 -1
- package/lib/duet/{p-790ee851.entry.js → p-91a3e8db.entry.js} +1 -1
- package/lib/duet/{p-b16befbc.system.entry.js → p-927f850c.system.entry.js} +1 -1
- package/lib/duet/{p-437fe50b.system.entry.js → p-97b88959.system.entry.js} +1 -1
- package/lib/duet/{p-76e38bb2.system.entry.js → p-97bbef5f.system.entry.js} +1 -1
- package/lib/duet/{p-97f1e254.entry.js → p-97d54e2d.entry.js} +1 -1
- package/lib/duet/{p-99fe93c6.system.entry.js → p-98cf83b0.system.entry.js} +1 -1
- package/lib/duet/{p-41cc3490.entry.js → p-9954eddc.entry.js} +1 -1
- package/lib/duet/{p-b8623ab8.entry.js → p-9d86935b.entry.js} +1 -1
- package/lib/duet/{p-4a7f290f.entry.js → p-a18f86a0.entry.js} +1 -1
- package/lib/duet/{p-071ebe1d.system.entry.js → p-a36592fe.system.entry.js} +1 -1
- package/lib/duet/{p-e7b761c5.system.js → p-a418cba4.system.js} +1 -1
- package/lib/duet/{p-68cbc3b7.entry.js → p-ac368fcb.entry.js} +1 -1
- package/lib/duet/{p-bf87d801.entry.js → p-af4aafea.entry.js} +1 -1
- package/lib/duet/{p-05e069d8.entry.js → p-b2a01d36.entry.js} +1 -1
- package/lib/duet/{p-30e901f2.system.entry.js → p-b2e25ecf.system.entry.js} +1 -1
- package/lib/duet/{p-542af014.system.js → p-b668b67c.system.js} +0 -0
- package/lib/duet/p-b708426c.entry.js +4 -0
- package/lib/duet/{p-c0aca70c.entry.js → p-b7a90031.entry.js} +1 -1
- package/lib/duet/{p-7a4764db.system.entry.js → p-bf052bc0.system.entry.js} +1 -1
- package/lib/duet/p-c21bd47a.js +5 -0
- package/lib/duet/{p-78de93b3.entry.js → p-c576c929.entry.js} +1 -1
- package/lib/duet/{p-53ad61ed.entry.js → p-c6e70db9.entry.js} +1 -1
- package/lib/duet/{p-10585f06.system.entry.js → p-cabfb664.system.entry.js} +1 -1
- package/lib/duet/{p-5f009925.system.entry.js → p-cd5ed901.system.entry.js} +1 -1
- package/lib/duet/{p-27d238c5.js → p-d4c234ed.js} +1 -1
- package/lib/duet/{p-641edb93.system.entry.js → p-d65262fb.system.entry.js} +1 -1
- package/lib/duet/{p-a509cc2b.system.entry.js → p-d698f01c.system.entry.js} +1 -1
- package/lib/duet/{p-3260eef0.entry.js → p-d7d0f3b7.entry.js} +1 -1
- package/lib/duet/{p-b08bb1fd.entry.js → p-dc1f4e8a.entry.js} +1 -1
- package/lib/duet/{p-afd34b6b.system.entry.js → p-df6ebe8d.system.entry.js} +1 -1
- package/lib/duet/p-dfa712ca.js +4 -0
- package/lib/duet/{p-b4ca3864.system.entry.js → p-eba2b43d.system.entry.js} +1 -1
- package/lib/duet/{p-24721182.system.entry.js → p-ec55c00f.system.entry.js} +1 -1
- package/lib/duet/{p-72739cec.entry.js → p-f3a98f22.entry.js} +1 -1
- package/lib/duet/{p-bb4d8e7b.entry.js → p-f9501a56.entry.js} +1 -1
- package/lib/duet/p-ff46ec81.system.js +16 -0
- package/lib/esm/{dom-3c479050.js → dom-3dbcb0d8.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +1 -1
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-breadcrumb.entry.js +1 -1
- package/lib/esm/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +1 -1
- package/lib/esm/duet-caption_4.entry.js +1 -1
- package/lib/esm/duet-card.entry.js +1 -1
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +2 -2
- package/lib/esm/duet-collapsible.entry.js +1 -1
- package/lib/esm/duet-combobox.entry.js +1 -1
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +2 -2
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table_3.entry.js +4 -3
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +1 -1
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +1 -1
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +1 -1
- package/lib/esm/duet-input_2.entry.js +1 -1
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +92 -47
- package/lib/esm/duet-pagination_2.entry.js +1 -1
- package/lib/esm/duet-progress.entry.js +1 -1
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +1 -1
- package/lib/esm/duet-tray.entry.js +1 -1
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +3 -3
- package/lib/esm/{focus-utils-3af074ea.js → focus-utils-a1fd6cac.js} +1 -1
- package/lib/esm/{index-ab2bfa68.js → index-179c634c.js} +11 -9
- package/lib/esm/loader.js +2 -2
- package/lib/esm/polyfills/css-shim.js +1 -1
- package/lib/esm/{shadow-css-fbe49d20.js → shadow-css-501eda9a.js} +2 -3
- package/lib/esm-es5/{dom-3c479050.js → dom-3dbcb0d8.js} +0 -0
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +2 -2
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.entry.js +2 -2
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +1 -1
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +2 -2
- package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{focus-utils-3af074ea.js → focus-utils-a1fd6cac.js} +1 -1
- package/lib/esm-es5/index-179c634c.js +5 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-501eda9a.js +15 -0
- package/lib/types/components/duet-number-input/duet-number-input.d.ts +0 -1
- package/lib/types/components.d.ts +192 -80
- package/lib/types/utils/math.utils.d.ts +11 -0
- package/package.json +6 -6
- package/lib/collection/components/duet-number-input/number-input-utils.js +0 -26
- package/lib/duet/p-12c89686.system.js +0 -4
- package/lib/duet/p-37dc064c.js +0 -4
- package/lib/duet/p-66536958.system.entry.js +0 -4
- package/lib/duet/p-92a25fb5.system.js +0 -16
- package/lib/duet/p-98a9556f.js +0 -4
- package/lib/duet/p-a76bf729.entry.js +0 -4
- package/lib/duet/p-b7462f8c.system.entry.js +0 -4
- package/lib/duet/p-cb8ebdd7.entry.js +0 -4
- package/lib/duet/p-fe99b9cb.entry.js +0 -4
- package/lib/esm-es5/index-ab2bfa68.js +0 -4
- package/lib/esm-es5/shadow-css-fbe49d20.js +0 -15
- package/lib/types/components/duet-number-input/number-input-utils.d.ts +0 -4
package/lib/cjs/duet.cjs.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
const index = require('./index-
|
|
6
|
+
const index = require('./index-3024eb44.js');
|
|
7
7
|
const appGlobals = require('./app-globals-a032b236.js');
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
|
-
Stencil Client Patch Browser v2.
|
|
10
|
+
Stencil Client Patch Browser v2.16.0 | MIT Licensed | https://stenciljs.com
|
|
11
11
|
*/
|
|
12
12
|
const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
|
|
13
13
|
const patchBrowser = () => {
|
|
@@ -38,7 +38,7 @@ const patchBrowser = () => {
|
|
|
38
38
|
if (!index.win.customElements) {
|
|
39
39
|
// module support, but no custom elements support (Old Edge)
|
|
40
40
|
// @ts-ignore
|
|
41
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "polyfills-dom" */ './dom-
|
|
41
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "polyfills-dom" */ './dom-96576bce.js'); }).then(() => opts);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
return index.promiseResolve(opts);
|
|
@@ -24,7 +24,7 @@ function _interopNamespace(e) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const NAMESPACE = 'duet';
|
|
27
|
-
const Env = /* duet */ {"cdnURILocal":"http://0.0.0.0:3334","cdnURIProd":"https://cdn.duetds.com/api","duetIconVersion":"2.3.
|
|
27
|
+
const Env = /* duet */ {"cdnURILocal":"http://0.0.0.0:3334","cdnURIProd":"https://cdn.duetds.com/api","duetIconVersion":"2.3.10"};
|
|
28
28
|
|
|
29
29
|
let scopeId;
|
|
30
30
|
let contentRef;
|
|
@@ -132,7 +132,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
132
132
|
};
|
|
133
133
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
134
134
|
let scopeId = getScopeId(cmpMeta);
|
|
135
|
-
|
|
135
|
+
const style = styles.get(scopeId);
|
|
136
136
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
137
137
|
// so the fallback is to always use the document for the root node in those cases
|
|
138
138
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
@@ -228,7 +228,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
228
228
|
let slotName = null;
|
|
229
229
|
let simple = false;
|
|
230
230
|
let lastSimple = false;
|
|
231
|
-
|
|
231
|
+
const vNodeChildren = [];
|
|
232
232
|
const walk = (c) => {
|
|
233
233
|
for (let i = 0; i < c.length; i++) {
|
|
234
234
|
child = c[i];
|
|
@@ -437,7 +437,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
437
437
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
438
438
|
try {
|
|
439
439
|
if (!elm.tagName.includes('-')) {
|
|
440
|
-
|
|
440
|
+
const n = newValue == null ? '' : newValue;
|
|
441
441
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
442
442
|
if (memberName === 'list') {
|
|
443
443
|
isProp = false;
|
|
@@ -514,7 +514,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
514
514
|
};
|
|
515
515
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
516
516
|
// tslint:disable-next-line: prefer-const
|
|
517
|
-
|
|
517
|
+
const newVNode = newParentVNode.$children$[childIndex];
|
|
518
518
|
let i = 0;
|
|
519
519
|
let elm;
|
|
520
520
|
let childNode;
|
|
@@ -847,7 +847,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
847
847
|
};
|
|
848
848
|
const updateFallbackSlotVisibility = (elm) => {
|
|
849
849
|
// tslint:disable-next-line: prefer-const
|
|
850
|
-
|
|
850
|
+
const childNodes = elm.childNodes;
|
|
851
851
|
let childNode;
|
|
852
852
|
let i;
|
|
853
853
|
let ilen;
|
|
@@ -900,8 +900,8 @@ const relocateSlotContent = (elm) => {
|
|
|
900
900
|
let relocateNodeData;
|
|
901
901
|
let j;
|
|
902
902
|
let i = 0;
|
|
903
|
-
|
|
904
|
-
|
|
903
|
+
const childNodes = elm.childNodes;
|
|
904
|
+
const ilen = childNodes.length;
|
|
905
905
|
for (; i < ilen; i++) {
|
|
906
906
|
childNode = childNodes[i];
|
|
907
907
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -1746,7 +1746,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1746
1746
|
if (!styles.has(scopeId)) {
|
|
1747
1747
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1748
1748
|
if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
1749
|
-
style = await Promise.resolve().then(function () { return require('./shadow-css-
|
|
1749
|
+
style = await Promise.resolve().then(function () { return require('./shadow-css-38b9e725.js'); }).then((m) => m.scopeCss(style, scopeId, false));
|
|
1750
1750
|
}
|
|
1751
1751
|
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1752
1752
|
endRegisterStyles();
|
|
@@ -2068,7 +2068,9 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2068
2068
|
if (module) {
|
|
2069
2069
|
return module[exportName];
|
|
2070
2070
|
}
|
|
2071
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
2071
2072
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2073
|
+
/* @vite-ignore */
|
|
2072
2074
|
/* webpackInclude: /\.entry\.js$/ */
|
|
2073
2075
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
2074
2076
|
/* webpackMode: "lazy" */
|
package/lib/cjs/loader.cjs.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-3024eb44.js');
|
|
9
9
|
const appGlobals = require('./app-globals-a032b236.js');
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
|
-
Stencil Client Patch Esm v2.
|
|
12
|
+
Stencil Client Patch Esm v2.16.0 | MIT Licensed | https://stenciljs.com
|
|
13
13
|
*/
|
|
14
14
|
const patchEsm = () => {
|
|
15
15
|
return index.promiseResolve();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
|
-
Stencil Client Platform v2.
|
|
7
|
+
Stencil Client Platform v2.16.0 | MIT Licensed | https://stenciljs.com
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
const safeSelector = (selector) => {
|
|
21
21
|
const placeholders = [];
|
|
22
22
|
let index = 0;
|
|
23
|
-
let content;
|
|
24
23
|
// Replaces attribute selectors with placeholders.
|
|
25
24
|
// The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
|
|
26
25
|
selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
|
|
@@ -31,7 +30,7 @@ const safeSelector = (selector) => {
|
|
|
31
30
|
});
|
|
32
31
|
// Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
|
|
33
32
|
// WS and "+" would otherwise be interpreted as selector separators.
|
|
34
|
-
content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
|
33
|
+
const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
|
35
34
|
const replaceBy = `__ph-${index}__`;
|
|
36
35
|
placeholders.push(exp);
|
|
37
36
|
index++;
|
|
@@ -195,6 +195,7 @@ export class DuetEditableTable {
|
|
|
195
195
|
render() {
|
|
196
196
|
return (h(Host, { class: {
|
|
197
197
|
[`duet-editable-table-${this.variation}`]: true,
|
|
198
|
+
"duet-editable-table": true,
|
|
198
199
|
[`duet-editable-table-${this.theme}`]: true,
|
|
199
200
|
// sticky only valid when in regular table layout
|
|
200
201
|
"duet-editable-table-scrollable": this.breakpoint === "none-scrollable",
|
|
@@ -203,7 +204,7 @@ export class DuetEditableTable {
|
|
|
203
204
|
"duet-m-0": this.margin === "none",
|
|
204
205
|
"duet-theme-turva": this.theme === "turva",
|
|
205
206
|
} },
|
|
206
|
-
h("duet-table", { sticky: this.sticky, stickyDistance: this.stickyDistance, margin: this.margin, theme: this.theme, variation: this.variation, breakpoint: this.breakpoint },
|
|
207
|
+
h("duet-table", { class: "duet-editable-table-table", sticky: this.sticky, stickyDistance: this.stickyDistance, margin: this.margin, theme: this.theme, variation: this.variation, breakpoint: this.breakpoint },
|
|
207
208
|
h("table", { role: this.accessibleRole },
|
|
208
209
|
h("caption", null,
|
|
209
210
|
h("slot", { name: "tcaption" })),
|
|
@@ -8,7 +8,7 @@ import { inheritGlobalTheme } from "../../common";
|
|
|
8
8
|
import { createID } from "../../utils/create-id";
|
|
9
9
|
import { isArrowDownKey, isArrowLeftKey, isArrowRightKey, isArrowUpKey, isBackspaceKey, } from "../../utils/keyboard-utils";
|
|
10
10
|
import { getLanguage, getLocale, getLocaleString } from "../../utils/language-utils";
|
|
11
|
-
import { clamp,
|
|
11
|
+
import { clamp, roundTo, SafeParseFloat } from "../../utils/math.utils";
|
|
12
12
|
export class DuetNumberInput {
|
|
13
13
|
constructor() {
|
|
14
14
|
this.inputId = createID("DuetInput");
|
|
@@ -174,7 +174,7 @@ export class DuetNumberInput {
|
|
|
174
174
|
this.handleChange = (ev) => {
|
|
175
175
|
const input = ev.target;
|
|
176
176
|
if (input && input.value) {
|
|
177
|
-
let value =
|
|
177
|
+
let value = SafeParseFloat(input.value, this.locale);
|
|
178
178
|
// Make sure that everything works if the user clears the input and
|
|
179
179
|
// starts typing non-numeric characters.
|
|
180
180
|
if (isNaN(value) || value == null) {
|
|
@@ -184,7 +184,7 @@ export class DuetNumberInput {
|
|
|
184
184
|
this.duetInput.emit({
|
|
185
185
|
component: "duet-number-input",
|
|
186
186
|
originalEvent: ev,
|
|
187
|
-
value: this.
|
|
187
|
+
value: SafeParseFloat(this.value, this.locale).toString(),
|
|
188
188
|
valueAsNumber: value,
|
|
189
189
|
});
|
|
190
190
|
}
|
|
@@ -205,30 +205,29 @@ export class DuetNumberInput {
|
|
|
205
205
|
if (input.value) {
|
|
206
206
|
// On blur we want to make sure that the user input is between the min and max values,
|
|
207
207
|
// and also round it up or down to the nearest step.
|
|
208
|
-
let value =
|
|
208
|
+
let value = SafeParseFloat(input.value, this.locale);
|
|
209
209
|
if (this.rounding) {
|
|
210
210
|
value = roundTo(value, this.step);
|
|
211
211
|
}
|
|
212
212
|
value = clamp(value, this.min, this.max);
|
|
213
|
-
if (value !==
|
|
213
|
+
if (value !== SafeParseFloat(this.value, this.locale) ||
|
|
214
|
+
value !== SafeParseFloat(this.focusedValue, this.locale)) {
|
|
214
215
|
this.setValue(value);
|
|
215
216
|
this.emitChange(ev);
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
});
|
|
225
|
-
}
|
|
219
|
+
this.duetChange.emit({
|
|
220
|
+
originalEvent: ev,
|
|
221
|
+
value: null,
|
|
222
|
+
valueAsNumber: null,
|
|
223
|
+
component: "duet-number-input",
|
|
224
|
+
});
|
|
226
225
|
};
|
|
227
226
|
/**
|
|
228
227
|
* Local methods.
|
|
229
228
|
*/
|
|
230
229
|
this.emitChange = (ev) => {
|
|
231
|
-
const currentValue = this.
|
|
230
|
+
const currentValue = SafeParseFloat(this.value, this.locale);
|
|
232
231
|
this.duetChange.emit({
|
|
233
232
|
originalEvent: ev,
|
|
234
233
|
value: currentValue.toString(),
|
|
@@ -236,10 +235,6 @@ export class DuetNumberInput {
|
|
|
236
235
|
component: "duet-number-input",
|
|
237
236
|
});
|
|
238
237
|
};
|
|
239
|
-
this.cleanValue = (value) => {
|
|
240
|
-
// Returns a number that can be used in calculations.
|
|
241
|
-
return value ? parseLocaleFloat(value, this.locale) : null;
|
|
242
|
-
};
|
|
243
238
|
this.localizeValue = (value) => {
|
|
244
239
|
// Returns a localized string that can be used as input value.
|
|
245
240
|
return value.toLocaleString(this.locale);
|
|
@@ -256,13 +251,13 @@ export class DuetNumberInput {
|
|
|
256
251
|
if (ev) {
|
|
257
252
|
ev.preventDefault();
|
|
258
253
|
}
|
|
259
|
-
const
|
|
254
|
+
const cleanedValue = SafeParseFloat(this.value, this.locale);
|
|
260
255
|
// Only fire change event when necessary
|
|
261
|
-
if (
|
|
256
|
+
if (cleanedValue === this.max) {
|
|
262
257
|
return;
|
|
263
258
|
}
|
|
264
259
|
// in cases where no value set, incrementing should go to min
|
|
265
|
-
let newValue =
|
|
260
|
+
let newValue = cleanedValue == null ? this.min : cleanedValue + this.step;
|
|
266
261
|
// handle cases where value is not multiple of step
|
|
267
262
|
// e.g. if someone enters 199, with a step of 100, add should go to 200
|
|
268
263
|
// and if someone enters 101, add should also go to 200
|
|
@@ -270,8 +265,8 @@ export class DuetNumberInput {
|
|
|
270
265
|
const adjustment = newValue % this.step;
|
|
271
266
|
newValue -= adjustment;
|
|
272
267
|
}
|
|
273
|
-
|
|
274
|
-
this.value = this.localizeValue(
|
|
268
|
+
const clampedValue = clamp(newValue, this.min, this.max);
|
|
269
|
+
this.value = this.localizeValue(clampedValue);
|
|
275
270
|
this.emitChange(ev);
|
|
276
271
|
};
|
|
277
272
|
this.subtract = (ev) => {
|
|
@@ -280,7 +275,7 @@ export class DuetNumberInput {
|
|
|
280
275
|
if (ev) {
|
|
281
276
|
ev.preventDefault();
|
|
282
277
|
}
|
|
283
|
-
const currentValue = this.
|
|
278
|
+
const currentValue = SafeParseFloat(this.value, this.locale);
|
|
284
279
|
// Only fire change event when necessary.
|
|
285
280
|
if (currentValue === this.min) {
|
|
286
281
|
return;
|
|
@@ -305,7 +300,7 @@ export class DuetNumberInput {
|
|
|
305
300
|
inheritGlobalTheme(this);
|
|
306
301
|
// Format the number value to a localeString initially.
|
|
307
302
|
if (this.value) {
|
|
308
|
-
this.value = this.localizeValue(
|
|
303
|
+
this.value = this.localizeValue(SafeParseFloat(this.value, this.locale));
|
|
309
304
|
}
|
|
310
305
|
}
|
|
311
306
|
/**
|
|
@@ -320,7 +315,7 @@ export class DuetNumberInput {
|
|
|
320
315
|
this.duetInputElement.value = "";
|
|
321
316
|
}
|
|
322
317
|
formatAnnouncement() {
|
|
323
|
-
const current = this.
|
|
318
|
+
const current = SafeParseFloat(this.value, this.locale);
|
|
324
319
|
if (current == null) {
|
|
325
320
|
return "";
|
|
326
321
|
}
|
|
@@ -333,7 +328,7 @@ export class DuetNumberInput {
|
|
|
333
328
|
render() {
|
|
334
329
|
const identifier = this.identifier || this.inputId;
|
|
335
330
|
const maxlength = `${this.localizeValue(this.max)} ${this.unit}`.length;
|
|
336
|
-
const cleanedValue = this.
|
|
331
|
+
const cleanedValue = SafeParseFloat(this.value, this.locale);
|
|
337
332
|
return (h(Host, { class: {
|
|
338
333
|
"duet-theme-turva": this.theme === "turva",
|
|
339
334
|
"duet-expand": this.expand,
|
|
@@ -71,15 +71,14 @@ duet-table .duet-table-action-row td:last-child {
|
|
|
71
71
|
white-space: nowrap;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.duet-table-flattened
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
.duet-table-flattened
|
|
81
|
-
|
|
82
|
-
content: "";
|
|
74
|
+
.duet-table-flattened table,
|
|
75
|
+
.duet-table-flattened thead,
|
|
76
|
+
.duet-table-flattened tbody,
|
|
77
|
+
.duet-table-flattened tfoot,
|
|
78
|
+
.duet-table-flattened th,
|
|
79
|
+
.duet-table-flattened td,
|
|
80
|
+
.duet-table-flattened tr {
|
|
81
|
+
display: block;
|
|
83
82
|
}
|
|
84
83
|
.duet-table-flattened thead tr {
|
|
85
84
|
position: absolute !important;
|
|
@@ -92,20 +91,11 @@ duet-table .duet-table-action-row td:last-child {
|
|
|
92
91
|
border: 0 !important;
|
|
93
92
|
}
|
|
94
93
|
.duet-table-flattened td {
|
|
95
|
-
grid-column: 1/2;
|
|
96
94
|
line-height: 1.25;
|
|
97
95
|
}
|
|
98
96
|
.duet-table-flattened td:not(:last-child) {
|
|
99
97
|
margin-bottom: 16px !important;
|
|
100
98
|
}
|
|
101
|
-
.duet-table-flattened td:first-child {
|
|
102
|
-
grid-row: 1;
|
|
103
|
-
grid-column: 1;
|
|
104
|
-
}
|
|
105
|
-
.duet-table-flattened td:last-child {
|
|
106
|
-
grid-row: 1;
|
|
107
|
-
grid-column: 2;
|
|
108
|
-
}
|
|
109
99
|
.duet-table-flattened tbody td,
|
|
110
100
|
.duet-table-flattened tbody th,
|
|
111
101
|
.duet-table-flattened tfoot td {
|
|
@@ -337,4 +327,26 @@ duet-table .duet-table-action-row td:last-child {
|
|
|
337
327
|
.duet-table-actions thead th:last-child {
|
|
338
328
|
width: 1px;
|
|
339
329
|
white-space: nowrap;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.duet-editable-table-table.duet-table-flattened tr {
|
|
333
|
+
display: grid;
|
|
334
|
+
grid-template-columns: repeat(2, 1fr);
|
|
335
|
+
grid-auto-rows: auto;
|
|
336
|
+
gap: 10px;
|
|
337
|
+
}
|
|
338
|
+
.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before {
|
|
339
|
+
padding: 0;
|
|
340
|
+
content: "";
|
|
341
|
+
}
|
|
342
|
+
.duet-editable-table-table.duet-table-flattened td {
|
|
343
|
+
grid-column: 1/2;
|
|
344
|
+
}
|
|
345
|
+
.duet-editable-table-table.duet-table-flattened td:first-child {
|
|
346
|
+
grid-row: 1;
|
|
347
|
+
grid-column: 1;
|
|
348
|
+
}
|
|
349
|
+
.duet-editable-table-table.duet-table-flattened td:last-child {
|
|
350
|
+
grid-row: 1;
|
|
351
|
+
grid-column: 2;
|
|
340
352
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* function that takes a string value or number and looks for any character resembling a minus,
|
|
6
|
+
* it will then replace it with a hypen-minus and return the parseFloat value of that string
|
|
7
|
+
* it will string / number cast the value to a number and return that number
|
|
8
|
+
* known issues: if a negative number is indicated with other characters than a "minus like" character, it will throw
|
|
9
|
+
* - an example is that some locales use (number) as an indicator for negative values instead of -number
|
|
10
|
+
*/
|
|
11
|
+
export function SafeParseFloat(value, locale) {
|
|
12
|
+
let results;
|
|
13
|
+
if (typeof value === "string") {
|
|
14
|
+
//the minuses are NOT the same characters, they differ in unicode for some languages
|
|
15
|
+
// "‐", "−", "–", and "—"
|
|
16
|
+
let convertedMinus = value.replace("−", "-").replace("‐", "-").replace("−", "-").replace("–", "-").replace("—", "-");
|
|
17
|
+
if (locale) {
|
|
18
|
+
convertedMinus = ConvertToEnUS(convertedMinus, locale, false);
|
|
19
|
+
}
|
|
20
|
+
// replace all possible spaces from the string
|
|
21
|
+
convertedMinus = convertedMinus.replace(/\s+/g, "");
|
|
22
|
+
convertedMinus = convertedMinus.replace(/(?!^-?\d*\.{0,1}\d+$)/g, "");
|
|
23
|
+
/*
|
|
24
|
+
example: https://regex101.com/r/np7FqS/1
|
|
25
|
+
/(?!^-?\d*\.{0,1}\d+$)/g
|
|
26
|
+
Negative Lookahead (?!^-?\d*\.{0,1}\d+$)
|
|
27
|
+
Assert that the Regex below does not match
|
|
28
|
+
^ asserts position at start of a line
|
|
29
|
+
- matches the character - with index 4510 (2D16 or 558) literally (case sensitive)
|
|
30
|
+
? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
|
|
31
|
+
\d matches a digit (equivalent to [0-9])
|
|
32
|
+
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
|
|
33
|
+
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
|
|
34
|
+
{0,1} matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)
|
|
35
|
+
\d matches a digit (equivalent to [0-9])
|
|
36
|
+
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
|
|
37
|
+
$ asserts position at the end of a line
|
|
38
|
+
Global pattern flags
|
|
39
|
+
g modifier: global. All matches (don't return after first match)
|
|
40
|
+
m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)
|
|
41
|
+
*/
|
|
42
|
+
results = parseFloat(convertedMinus);
|
|
43
|
+
}
|
|
44
|
+
if (typeof value === "number") {
|
|
45
|
+
results = parseFloat(String(value));
|
|
46
|
+
}
|
|
47
|
+
if (!isNaN(Number(results))) {
|
|
48
|
+
return Number(results);
|
|
49
|
+
}
|
|
50
|
+
if (value === null || value === undefined) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
throw new Error("Invalid value passed to SafeParseFloat");
|
|
54
|
+
}
|
|
55
|
+
// string conversion function that takes a locale and coverts decimal indicator to en-US indicator
|
|
56
|
+
// and takes the thousand separator for the given locale and transforms that to the en-US separator
|
|
57
|
+
export function ConvertToEnUS(value, locale, replaceThousands = false) {
|
|
58
|
+
let replacedValue;
|
|
59
|
+
const localeSeparator = new Intl.NumberFormat(locale).format(1 / 2).replace(/[0-9]/g, "");
|
|
60
|
+
const enUSSeparator = new Intl.NumberFormat("en-US").format(1 / 2).replace(/[0-9]/g, "");
|
|
61
|
+
const thousandSeparator = new Intl.NumberFormat(locale).format(1000).replace(/[0-9]/g, "");
|
|
62
|
+
const enUSThousandSeparator = new Intl.NumberFormat("en-US").format(1000).replace(/[0-9]/g, "");
|
|
63
|
+
// double conversions to avoid ,->. and .->, at the same time resulting in a double conversion
|
|
64
|
+
replacedValue = value.replace(localeSeparator, "DECIMALSEPARATOR");
|
|
65
|
+
if (replaceThousands) {
|
|
66
|
+
replacedValue = replacedValue.replace(thousandSeparator, "THOUSANDSEPARATOR");
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
replacedValue = replacedValue.replace(thousandSeparator, "");
|
|
70
|
+
}
|
|
71
|
+
replacedValue = replacedValue.replace("DECIMALSEPARATOR", enUSSeparator);
|
|
72
|
+
replacedValue = replacedValue.replace("THOUSANDSEPARATOR", enUSThousandSeparator);
|
|
73
|
+
return replacedValue;
|
|
74
|
+
}
|
|
75
|
+
export const roundTo = (val, multiple) => Math.round(val / multiple) * multiple;
|
|
76
|
+
export const clamp = (val, min, max) => Math.min(Math.max(val, min), max);
|