@icure/form 2.0.11 → 2.1.2
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/.yarn/cache/@babel-runtime-npm-7.28.6-f40c99aeef-42d8a868c2.zip +0 -0
- package/.yarn/cache/@icure-api-npm-5.3.18-99d397b97c-0da319f009.zip +0 -0
- package/.yarn/cache/@icure-motss-app-datepicker-npm-6.0.0-rc.40-ca1da7abbb-9bbe2bed34.zip +0 -0
- package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.5.1-3b3c832bd1-22c404c481.zip +0 -0
- package/.yarn/cache/@lit-reactive-element-npm-1.6.3-4828441e51-79b58631c3.zip +0 -0
- package/.yarn/cache/@lit-reactive-element-npm-2.1.2-2c713bebce-e0ed931b9c.zip +0 -0
- package/.yarn/cache/@lit-task-npm-1.0.3-48f265b3e9-790b6a2603.zip +0 -0
- package/.yarn/cache/@material-animation-npm-14.0.0-canary.53b3cad2f.0-06a813cdea-9b5190654c.zip +0 -0
- package/.yarn/cache/@material-base-npm-14.0.0-canary.53b3cad2f.0-d195c1fdc4-9f4928d115.zip +0 -0
- package/.yarn/cache/@material-button-npm-14.0.0-canary.53b3cad2f.0-d4b070f508-873295c56a.zip +0 -0
- package/.yarn/cache/@material-density-npm-14.0.0-canary.53b3cad2f.0-48c1f65059-a23f00edfe.zip +0 -0
- package/.yarn/cache/@material-dialog-npm-14.0.0-canary.53b3cad2f.0-96168fa294-c1a498b81a.zip +0 -0
- package/.yarn/cache/@material-dom-npm-14.0.0-canary.53b3cad2f.0-ac009dc871-f5817f76dd.zip +0 -0
- package/.yarn/cache/@material-elevation-npm-14.0.0-canary.53b3cad2f.0-3312f06793-2f8945c7b6.zip +0 -0
- package/.yarn/cache/@material-feature-targeting-npm-14.0.0-canary.53b3cad2f.0-a919042d50-e7a1ed68f9.zip +0 -0
- package/.yarn/cache/@material-floating-label-npm-14.0.0-canary.53b3cad2f.0-eb8f330f2f-5295dc481d.zip +0 -0
- package/.yarn/cache/@material-focus-ring-npm-14.0.0-canary.53b3cad2f.0-b22f851a2e-92273b1247.zip +0 -0
- package/.yarn/cache/@material-icon-button-npm-14.0.0-canary.53b3cad2f.0-e158d26048-19b51665f2.zip +0 -0
- package/.yarn/cache/@material-line-ripple-npm-14.0.0-canary.53b3cad2f.0-d089468db9-6518961487.zip +0 -0
- package/.yarn/cache/@material-list-npm-14.0.0-canary.53b3cad2f.0-df9ce05084-6c977f518d.zip +0 -0
- package/.yarn/cache/@material-menu-npm-14.0.0-canary.53b3cad2f.0-9489b592c8-71b6a1f4dd.zip +0 -0
- package/.yarn/cache/@material-menu-surface-npm-14.0.0-canary.53b3cad2f.0-52212f38f4-ad48e168ca.zip +0 -0
- package/.yarn/cache/@material-mwc-base-npm-0.27.0-79caf3ef2b-07af17edfc.zip +0 -0
- package/.yarn/cache/@material-mwc-button-npm-0.27.0-4b85f2b26f-2ef5cc0951.zip +0 -0
- package/.yarn/cache/@material-mwc-checkbox-npm-0.27.0-e837031d8e-ba53a6ea8c.zip +0 -0
- package/.yarn/cache/@material-mwc-dialog-npm-0.27.0-77c6071543-ffab528e8e.zip +0 -0
- package/.yarn/cache/@material-mwc-floating-label-npm-0.27.0-80e62b22c0-fbbf4f2e42.zip +0 -0
- package/.yarn/cache/@material-mwc-icon-button-npm-0.27.0-41f82f135b-7315c0735b.zip +0 -0
- package/.yarn/cache/@material-mwc-icon-npm-0.27.0-98c9e8509f-6dfa5115d5.zip +0 -0
- package/.yarn/cache/@material-mwc-line-ripple-npm-0.27.0-e6704221e0-6862ede0f4.zip +0 -0
- package/.yarn/cache/@material-mwc-list-npm-0.27.0-5344fc9de4-6c2ae4f1c6.zip +0 -0
- package/.yarn/cache/@material-mwc-menu-npm-0.27.0-7c2bb47797-126f733659.zip +0 -0
- package/.yarn/cache/@material-mwc-notched-outline-npm-0.27.0-0e0d1c4d5f-2739032f76.zip +0 -0
- package/.yarn/cache/@material-mwc-radio-npm-0.27.0-aa2098a280-0b0a0a6b99.zip +0 -0
- package/.yarn/cache/@material-mwc-ripple-npm-0.27.0-ed37672f08-9cd73fdfe4.zip +0 -0
- package/.yarn/cache/@material-mwc-textfield-npm-0.27.0-dabd704f55-978c893aca.zip +0 -0
- package/.yarn/cache/@material-notched-outline-npm-14.0.0-canary.53b3cad2f.0-ecacde98db-1a9f8db4d8.zip +0 -0
- package/.yarn/cache/@material-radio-npm-14.0.0-canary.53b3cad2f.0-c50de64d41-898554f2b3.zip +0 -0
- package/.yarn/cache/@material-ripple-npm-14.0.0-canary.53b3cad2f.0-49060bfe7e-08b71917e2.zip +0 -0
- package/.yarn/cache/@material-rtl-npm-14.0.0-canary.53b3cad2f.0-daca794b76-3c1b8b48c6.zip +0 -0
- package/.yarn/cache/@material-shape-npm-14.0.0-canary.53b3cad2f.0-5bcff722a6-6ad9b020c0.zip +0 -0
- package/.yarn/cache/@material-textfield-npm-14.0.0-canary.53b3cad2f.0-4414808dda-7072e3c9df.zip +0 -0
- package/.yarn/cache/@material-theme-npm-14.0.0-canary.53b3cad2f.0-9a24e7b046-fd44e92917.zip +0 -0
- package/.yarn/cache/@material-tokens-npm-14.0.0-canary.53b3cad2f.0-f1c87523da-efa909f861.zip +0 -0
- package/.yarn/cache/@material-touch-target-npm-14.0.0-canary.53b3cad2f.0-fa6a2d0875-dbc13cbe7a.zip +0 -0
- package/.yarn/cache/@material-typography-npm-14.0.0-canary.53b3cad2f.0-f4a58946f1-fa2671df40.zip +0 -0
- package/.yarn/cache/@types-linkify-it-npm-5.0.0-576a16b976-ec98e03aa8.zip +0 -0
- package/.yarn/cache/@types-markdown-it-npm-14.1.2-d0c4e12c49-ad66e0b377.zip +0 -0
- package/.yarn/cache/@types-mdurl-npm-2.0.0-2f4116c0b0-78746e96c6.zip +0 -0
- package/.yarn/cache/@types-trusted-types-npm-2.0.7-a07fc44f59-8e4202766a.zip +0 -0
- package/.yarn/cache/@webcomponents-webcomponentsjs-npm-2.8.0-36c07db4d2-186373c030.zip +0 -0
- package/.yarn/cache/argparse-npm-2.0.1-faff7999e6-83644b5649.zip +0 -0
- package/.yarn/cache/big-integer-npm-1.6.52-4bec75720c-6e86885787.zip +0 -0
- package/.yarn/cache/blocking-elements-npm-0.1.1-423f51c76e-9a34084405.zip +0 -0
- package/.yarn/cache/date-fns-npm-2.30.0-895c790e0f-f7be015232.zip +0 -0
- package/.yarn/cache/entities-npm-4.5.0-7cdb83b832-853f8ebd5b.zip +0 -0
- package/.yarn/cache/fast-deep-equal-npm-3.1.3-790edcfcf5-e21a9d8d84.zip +0 -0
- package/.yarn/cache/libphonenumber-js-npm-1.12.34-cd35ce8e26-e4bb10ba42.zip +0 -0
- package/.yarn/cache/linkify-it-npm-5.0.0-adb5f9c96f-b0b86cadaf.zip +0 -0
- package/.yarn/cache/lit-element-npm-3.3.3-2f9f9e38c0-29a596fa55.zip +0 -0
- package/.yarn/cache/lit-element-npm-4.2.2-70d4af2233-554254b87c.zip +0 -0
- package/.yarn/cache/lit-html-npm-2.8.0-82f88d6ebf-2d70df0724.zip +0 -0
- package/.yarn/cache/lit-html-npm-3.3.2-4a3e00215f-7fe23502ca.zip +0 -0
- package/.yarn/cache/lit-npm-2.8.0-92bb1333a4-2480e733f7.zip +0 -0
- package/.yarn/cache/lit-npm-3.3.2-7dea58471e-2136d4beac.zip +0 -0
- package/.yarn/cache/lodash-npm-4.17.21-6382451519-eb835a2e51.zip +0 -0
- package/.yarn/cache/markdown-it-npm-14.1.0-e337d75bfe-07296b45eb.zip +0 -0
- package/.yarn/cache/mdurl-npm-2.0.0-3259713daf-880bc289ef.zip +0 -0
- package/.yarn/cache/moment-npm-2.30.1-1c51a5c631-859236bab1.zip +0 -0
- package/.yarn/cache/orderedmap-npm-2.1.1-64b8a0684f-082cf970b0.zip +0 -0
- package/.yarn/cache/prosemirror-commands-npm-1.7.1-5b2afb6640-2316c40ea2.zip +0 -0
- package/.yarn/cache/prosemirror-history-npm-1.5.0-e639d02880-6afb0e1d17.zip +0 -0
- package/.yarn/cache/prosemirror-keymap-npm-1.2.3-0e7e0c8195-0a2eed2771.zip +0 -0
- package/.yarn/cache/prosemirror-markdown-npm-1.13.2-6e2f179fd8-ce9fcb3b13.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.25.4-e7ee2df3df-ab5aa609df.zip +0 -0
- package/.yarn/cache/prosemirror-schema-basic-npm-1.2.4-8f943ded01-10ed022990.zip +0 -0
- package/.yarn/cache/prosemirror-schema-list-npm-1.5.1-7b138c5fed-6c7041e5b8.zip +0 -0
- package/.yarn/cache/prosemirror-state-npm-1.4.4-8b7e3a396c-1b5dba46c2.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.10.5-5b3b4f5f61-6f5921e53a.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.41.5-39b37df338-ee47e9091a.zip +0 -0
- package/.yarn/cache/punycode.js-npm-2.3.1-9084ecbbf5-13466d7ed5.zip +0 -0
- package/.yarn/cache/rope-sequence-npm-1.3.4-3b09587e5f-95cca2f99a.zip +0 -0
- package/.yarn/cache/text-encoding-npm-0.7.0-ff0c4af052-b6109a843f.zip +0 -0
- package/.yarn/cache/tslib-npm-2.8.1-66590b21b8-e4aba30e63.zip +0 -0
- package/.yarn/cache/uc.micro-npm-2.1.0-c45282c865-3719735824.zip +0 -0
- package/.yarn/cache/uuid-encoder-npm-1.2.0-6a9a810c6d-dd06230f08.zip +0 -0
- package/.yarn/cache/uuid-npm-8.3.2-eca0baba53-5575a8a75c.zip +0 -0
- package/.yarn/cache/uuid-npm-9.0.1-39a8442bc6-39931f6da7.zip +0 -0
- package/.yarn/cache/w3c-keyname-npm-2.2.8-66d7d5317a-95bafa4c04.zip +0 -0
- package/.yarn/cache/wicg-inert-npm-3.1.3-38590e83f2-45b3cfec63.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/components/common/field-with-options.d.ts +2 -2
- package/components/common/field-with-options.js +8 -5
- package/components/common/field-with-options.js.map +1 -1
- package/components/common/field.d.ts +10 -3
- package/components/common/field.js +46 -21
- package/components/common/field.js.map +1 -1
- package/components/common/index.js +17 -1
- package/components/common/index.js.map +1 -1
- package/components/common/metadata-buttons-bar.d.ts +2 -1
- package/components/common/metadata-buttons-bar.js +113 -77
- package/components/common/metadata-buttons-bar.js.map +1 -1
- package/components/common/styles/paths.d.ts +1 -0
- package/components/common/styles/paths.js +41 -25
- package/components/common/styles/paths.js.map +1 -1
- package/components/common/utils.js +21 -11
- package/components/common/utils.js.map +1 -1
- package/components/icure-button/index.d.ts +1 -1
- package/components/icure-button/index.js +73 -29
- package/components/icure-button/index.js.map +1 -1
- package/components/icure-button-group/index.d.ts +5 -3
- package/components/icure-button-group/index.js +101 -61
- package/components/icure-button-group/index.js.map +1 -1
- package/components/icure-date-picker/index.d.ts +6 -3
- package/components/icure-date-picker/index.js +87 -43
- package/components/icure-date-picker/index.js.map +1 -1
- package/components/icure-dropdown-field/index.d.ts +5 -2
- package/components/icure-dropdown-field/index.js +82 -38
- package/components/icure-dropdown-field/index.js.map +1 -1
- package/components/icure-form/fields/button/button.js +17 -13
- package/components/icure-form/fields/button/button.js.map +1 -1
- package/components/icure-form/fields/button/index.js +17 -1
- package/components/icure-form/fields/button/index.js.map +1 -1
- package/components/icure-form/fields/button-group/checkbox.d.ts +2 -1
- package/components/icure-form/fields/button-group/checkbox.js +15 -11
- package/components/icure-form/fields/button-group/checkbox.js.map +1 -1
- package/components/icure-form/fields/button-group/index.js +18 -2
- package/components/icure-form/fields/button-group/index.js.map +1 -1
- package/components/icure-form/fields/button-group/radio-button.d.ts +2 -1
- package/components/icure-form/fields/button-group/radio-button.js +15 -11
- package/components/icure-form/fields/button-group/radio-button.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-picker.d.ts +2 -1
- package/components/icure-form/fields/date-picker/date-picker.js +13 -9
- package/components/icure-form/fields/date-picker/date-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-time-picker.d.ts +2 -1
- package/components/icure-form/fields/date-picker/date-time-picker.js +13 -9
- package/components/icure-form/fields/date-picker/date-time-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/index.js +19 -3
- package/components/icure-form/fields/date-picker/index.js.map +1 -1
- package/components/icure-form/fields/date-picker/time-picker.d.ts +2 -1
- package/components/icure-form/fields/date-picker/time-picker.js +13 -9
- package/components/icure-form/fields/date-picker/time-picker.js.map +1 -1
- package/components/icure-form/fields/dropdown/dropdown-field.d.ts +1 -1
- package/components/icure-form/fields/dropdown/dropdown-field.js +15 -11
- package/components/icure-form/fields/dropdown/dropdown-field.js.map +1 -1
- package/components/icure-form/fields/dropdown/index.js +17 -1
- package/components/icure-form/fields/dropdown/index.js.map +1 -1
- package/components/icure-form/fields/index.js +26 -10
- package/components/icure-form/fields/index.js.map +1 -1
- package/components/icure-form/fields/items-list-field/index.js +17 -1
- package/components/icure-form/fields/items-list-field/index.js.map +1 -1
- package/components/icure-form/fields/items-list-field/items-list-field.d.ts +2 -1
- package/components/icure-form/fields/items-list-field/items-list-field.js +12 -8
- package/components/icure-form/fields/items-list-field/items-list-field.js.map +1 -1
- package/components/icure-form/fields/label/index.js +17 -1
- package/components/icure-form/fields/label/index.js.map +1 -1
- package/components/icure-form/fields/label/label.js +15 -11
- package/components/icure-form/fields/label/label.js.map +1 -1
- package/components/icure-form/fields/measure-field/index.js +17 -1
- package/components/icure-form/fields/measure-field/index.js.map +1 -1
- package/components/icure-form/fields/measure-field/measure-field.d.ts +2 -1
- package/components/icure-form/fields/measure-field/measure-field.js +14 -9
- package/components/icure-form/fields/measure-field/measure-field.js.map +1 -1
- package/components/icure-form/fields/number-field/index.js +17 -1
- package/components/icure-form/fields/number-field/index.js.map +1 -1
- package/components/icure-form/fields/number-field/number-field.d.ts +2 -1
- package/components/icure-form/fields/number-field/number-field.js +14 -9
- package/components/icure-form/fields/number-field/number-field.js.map +1 -1
- package/components/icure-form/fields/text-field/index.js +17 -1
- package/components/icure-form/fields/text-field/index.js.map +1 -1
- package/components/icure-form/fields/text-field/text-field.d.ts +2 -1
- package/components/icure-form/fields/text-field/text-field.js +26 -21
- package/components/icure-form/fields/text-field/text-field.js.map +1 -1
- package/components/icure-form/fields/token-field/index.js +17 -1
- package/components/icure-form/fields/token-field/index.js.map +1 -1
- package/components/icure-form/fields/token-field/token-field.d.ts +2 -1
- package/components/icure-form/fields/token-field/token-field.js +13 -9
- package/components/icure-form/fields/token-field/token-field.js.map +1 -1
- package/components/icure-form/fields/utils/index.js +13 -5
- package/components/icure-form/fields/utils/index.js.map +1 -1
- package/components/icure-form/index.d.ts +6 -2
- package/components/icure-form/index.js +138 -44
- package/components/icure-form/index.js.map +1 -1
- package/components/icure-form/renderer/form/form-selection-button.js +67 -27
- package/components/icure-form/renderer/form/form-selection-button.js.map +1 -1
- package/components/icure-form/renderer/form/form.js +264 -219
- package/components/icure-form/renderer/form/form.js.map +1 -1
- package/components/icure-form/renderer/index.d.ts +1 -1
- package/components/icure-form/renderer/index.js +2 -1
- package/components/icure-form/renderer/index.js.map +1 -1
- package/components/icure-label/index.js +70 -26
- package/components/icure-label/index.js.map +1 -1
- package/components/icure-text-field/index.d.ts +8 -2
- package/components/icure-text-field/index.js +309 -145
- package/components/icure-text-field/index.js.map +1 -1
- package/components/icure-text-field/plugin/caret-fix-plugin.js +7 -3
- package/components/icure-text-field/plugin/caret-fix-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/has-content-class-plugin.js +7 -3
- package/components/icure-text-field/plugin/has-content-class-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/mask-plugin.js +11 -7
- package/components/icure-text-field/plugin/mask-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/regexp-plugin.js +9 -5
- package/components/icure-text-field/plugin/regexp-plugin.js.map +1 -1
- package/components/icure-text-field/prosemirror-commands.js +14 -10
- package/components/icure-text-field/prosemirror-commands.js.map +1 -1
- package/components/icure-text-field/prosemirror-utils.js +4 -1
- package/components/icure-text-field/prosemirror-utils.js.map +1 -1
- package/components/icure-text-field/schema/common-marks.js +7 -3
- package/components/icure-text-field/schema/common-marks.js.map +1 -1
- package/components/icure-text-field/schema/date-time-schema.js +8 -3
- package/components/icure-text-field/schema/date-time-schema.js.map +1 -1
- package/components/icure-text-field/schema/decimal-schema.js +4 -1
- package/components/icure-text-field/schema/decimal-schema.js.map +1 -1
- package/components/icure-text-field/schema/index.js +20 -17
- package/components/icure-text-field/schema/index.js.map +1 -1
- package/components/icure-text-field/schema/items-list-schema.js +6 -3
- package/components/icure-text-field/schema/items-list-schema.js.map +1 -1
- package/components/icure-text-field/schema/markdown-schema.js +10 -28
- package/components/icure-text-field/schema/markdown-schema.js.map +1 -1
- package/components/icure-text-field/schema/measure-schema.js +12 -6
- package/components/icure-text-field/schema/measure-schema.js.map +1 -1
- package/components/icure-text-field/schema/token-schema.js +8 -5
- package/components/icure-text-field/schema/token-schema.js.map +1 -1
- package/components/icure-text-field/schema/utils.js +6 -2
- package/components/icure-text-field/schema/utils.js.map +1 -1
- package/components/icure-text-field/selection-companion.js +5 -1
- package/components/icure-text-field/selection-companion.js.map +1 -1
- package/components/icure-text-field/suggestion-palette.js +10 -3
- package/components/icure-text-field/suggestion-palette.js.map +1 -1
- package/components/index.js +21 -5
- package/components/index.js.map +1 -1
- package/components/model/index.js +46 -22
- package/components/model/index.js.map +1 -1
- package/components/themes/default/index.js +32 -30
- package/components/themes/default/index.js.map +1 -1
- package/components/themes/icure-blue/index.js +104 -47
- package/components/themes/icure-blue/index.js.map +1 -1
- package/components/themes/kendo/index.js +55 -49
- package/components/themes/kendo/index.js.map +1 -1
- package/conversion/ckmeans-grouping.js +10 -3
- package/conversion/ckmeans-grouping.js.map +1 -1
- package/conversion/ckmeans.js +3 -1
- package/conversion/ckmeans.js.map +1 -1
- package/conversion/icure-convert.js +21 -18
- package/conversion/icure-convert.js.map +1 -1
- package/generic/index.js +17 -1
- package/generic/index.js.map +1 -1
- package/generic/model.d.ts +5 -4
- package/generic/model.js +2 -1
- package/generic/model.js.map +1 -1
- package/icure/form-values-container.d.ts +21 -13
- package/icure/form-values-container.js +265 -163
- package/icure/form-values-container.js.map +1 -1
- package/icure/icure-utils.js +21 -10
- package/icure/icure-utils.js.map +1 -1
- package/icure/index.js +18 -2
- package/icure/index.js.map +1 -1
- package/icure/model.js +2 -1
- package/index.d.ts +1 -0
- package/index.js +19 -1
- package/index.js.map +1 -1
- package/package.json +16 -13
- package/utils/code-utils.js +19 -11
- package/utils/code-utils.js.map +1 -1
- package/utils/dates.js +20 -9
- package/utils/dates.js.map +1 -1
- package/utils/fields-values-provider.d.ts +1 -1
- package/utils/fields-values-provider.js +28 -11
- package/utils/fields-values-provider.js.map +1 -1
- package/utils/interpreter.d.ts +2 -3
- package/utils/interpreter.js +16 -3
- package/utils/interpreter.js.map +1 -1
- package/utils/languages.js +8 -3
- package/utils/languages.js.map +1 -1
- package/utils/markdown.js +11 -6
- package/utils/markdown.js.map +1 -1
- package/utils/no-lodash.js +8 -3
- package/utils/no-lodash.js.map +1 -1
- package/utils/primitive.d.ts +1 -1
- package/utils/primitive.js +16 -11
- package/utils/primitive.js.map +1 -1
- package/utils/form-value-container.d.ts +0 -3
- package/utils/form-value-container.js +0 -30
- package/utils/form-value-container.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../tmp/components/themes/icure-blue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,QAAQ,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,KAAK,EACL,MAAM,EACN,YAAY,EACZ,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,GACV,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;A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tLabel,\n\tButton,\n\tMeasureField,\n\tNumberField,\n\tRadioButton,\n\tTextField,\n\tTimePicker,\n\tTokenField,\n} from '../../icure-form/fields'\nimport { IcureButtonGroup } from '../../icure-button-group'\nimport { IcureDatePickerField } from '../../icure-date-picker'\nimport { IcureDropdownField } from '../../icure-dropdown-field'\nimport { IcureForm } from '../../icure-form'\nimport { IcureLabel } from '../../icure-label'\nimport { IcureTextField, MetadataButtonBarWrapper } from '../../icure-text-field'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst ehrLiteCss = css`.icure-text-field,\n.icure-button-group {\n width: 100%;\n}\n.icure-text-field .icure-label,\n.icure-button-group .icure-label {\n color: #1D2235;\n font-size: 14px;\n font-weight: 400;\n}\n.icure-text-field .icure-label > span,\n.icure-button-group .icure-label > span {\n display: block;\n word-wrap: break-word;\n overflow: auto;\n font-weight: 400;\n}\n.icure-text-field > .icure-input,\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container,\n.icure-button-group .icure-input,\n.icure-button-group .input-container {\n cursor: pointer;\n border-radius: 6px;\n padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 13px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: #DDE3E7;\n color: #1D2235;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError,\n.icure-button-group .icure-input__validationError,\n.icure-button-group .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .input-container__withMetadata,\n.icure-button-group .icure-input__withMetadata,\n.icure-button-group .input-container__withMetadata {\n border-radius: 6px 0 0 6px;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within,\n.icure-button-group .icure-input:focus,\n.icure-button-group .icure-input:focus-within,\n.icure-button-group .input-container:focus,\n.icure-button-group .input-container:focus-within {\n box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);\n border-color: #084B83;\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover,\n.icure-button-group .icure-input:hover,\n.icure-button-group .input-container:hover {\n border-color: #084B83;\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within,\n.icure-button-group .icure-input:hover:focus,\n.icure-button-group .icure-input:hover:focus-within,\n.icure-button-group .input-container:hover:focus,\n.icure-button-group .input-container:hover:focus-within {\n box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);\n border-color: #084B83;\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror,\n.icure-button-group .icure-input .ProseMirror,\n.icure-button-group .input-container .ProseMirror {\n padding: 0;\n font-size: 13px;\n line-height: 1.4em;\n color: #1D2235;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date,\n.icure-button-group .icure-input .ProseMirror .date,\n.icure-button-group .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time,\n.icure-button-group .icure-input .ProseMirror .time,\n.icure-button-group .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused, .icure-text-field .icure-input .ProseMirror:hover,\n.icure-text-field .input-container .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:hover,\n.icure-button-group .icure-input .ProseMirror:focus .focused,\n.icure-button-group .icure-input .ProseMirror:hover,\n.icure-button-group .input-container .ProseMirror:focus .focused,\n.icure-button-group .input-container .ProseMirror:hover {\n border-color: #084B83;\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg,\n.icure-button-group .icure-input > svg,\n.icure-button-group .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path,\n.icure-button-group .icure-input > svg path,\n.icure-button-group .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra,\n.icure-button-group .icure-input .extra,\n.icure-button-group .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info,\n.icure-button-group .icure-input .extra > .info,\n.icure-button-group .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path,\n.icure-button-group .icure-input .extra .buttons-container .btn svg path,\n.icure-button-group .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover,\n.icure-button-group .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-button-group .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n.icure-text-field .icure-input .extra > .options > .selected,\n.icure-text-field .input-container .extra > .options > .selected,\n.icure-button-group .icure-input .extra > .options > .selected,\n.icure-button-group .input-container .extra > .options > .selected {\n color: white;\n background-color: #084B83;\n}\n\n.icure-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n cursor: pointer;\n}\n.menu-container .item.existing {\n background-color: #BFE8EA;\n}\n.menu-container .item.selected {\n color: white;\n background-color: #084B83;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:hover {\n border-color: #DCE7F2;\n}\n.icure-checkbox:checked {\n accent-color: #084B83;\n}\n\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: calc(1.4em + 1px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #1D2235;\n display: flex;\n align-items: center;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n\n.icure-input #editor {\n color: #1D2235;\n}\n.icure-input #editor.tokens-list .ProseMirror li, .icure-input #editor.styled-tokens-list .ProseMirror li {\n background-color: #DCE7F2;\n}\n.icure-input #editor.tokens-list .ProseMirror li span:after, .icure-input #editor.styled-tokens-list .ProseMirror li span:after {\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n}\n.icure-input #editor.items-list .ProseMirror li {\n border-bottom: 1px dotted #8DA6BF;\n}\n.icure-input .select-arrow {\n opacity: 1;\n}\n.icure-input .select-arrow svg {\n width: 15px;\n height: 15px;\n}\n.icure-input .select-arrow svg path {\n fill: #9CA8B2;\n}\n.icure-input .options {\n padding: 2px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n border-radius: 6px;\n background: white;\n box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 0px rgba(0, 0, 0, 0.05);\n}\n.icure-input .options .option {\n height: auto;\n min-height: unset;\n display: flex;\n padding: 8px;\n align-items: center;\n align-self: stretch;\n border-radius: 4px;\n background: white;\n color: #1D2235;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n cursor: pointer;\n}\n.icure-input .options .option:hover {\n background: #DCE7F2;\n color: #084B83;\n}\n.icure-input:hover .select-arrow svg path, .icure-input:focus .select-arrow svg path {\n fill: #084B83;\n}` \nimport { MetadataButtonBar } from '../../common/metadata-buttons-bar'\nimport { IcureButton } from '../../icure-button'\nimport { FormSelectionButton } from '../../icure-form/renderer/form/form-selection-button'\n\nclass EhrLiteIcureButtonGroup extends IcureButtonGroup {\n\tstatic get styles() {\n\t\treturn [...IcureButtonGroup.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureDatePickerField extends IcureDatePickerField {\n\tstatic get styles() {\n\t\treturn [...IcureDatePickerField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureDropdownField extends IcureDropdownField {\n\tstatic get styles() {\n\t\treturn [...IcureDropdownField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureForm extends IcureForm {\n\tstatic get styles() {\n\t\treturn [...IcureForm.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureLabel extends IcureLabel {\n\tstatic get styles() {\n\t\treturn [...IcureLabel.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureButton extends IcureButton {\n\tstatic get styles() {\n\t\treturn [...IcureButton.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureTextField extends IcureTextField {\n\tstatic get styles() {\n\t\treturn [...IcureTextField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteLabel extends Label {\n\tstatic get styles() {\n\t\treturn [...Label.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteMetadataButtonBar extends MetadataButtonBar {\n\tstatic get styles() {\n\t\treturn [...MetadataButtonBar.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteButton extends Button {\n\tstatic get styles() {\n\t\treturn [...Button.styles, ehrLiteCss]\n\t}\n}\n\ncustomElements.define('icure-metadata-buttons-bar', EhrLiteMetadataButtonBar)\ncustomElements.define('icure-metadata-buttons-bar-wrapper', MetadataButtonBarWrapper)\n\ncustomElements.define('icure-form-checkbox', CheckBox)\ncustomElements.define('icure-form-date-picker', DatePicker)\ncustomElements.define('icure-form-date-time-picker', DateTimePicker)\ncustomElements.define('icure-form-dropdown-field', DropdownField)\ncustomElements.define('icure-button-group', EhrLiteIcureButtonGroup)\ncustomElements.define('icure-date-picker-field', EhrLiteIcureDatePickerField)\ncustomElements.define('icure-dropdown-field', EhrLiteIcureDropdownField)\ncustomElements.define('icure-form', EhrLiteIcureForm)\ncustomElements.define('icure-label', EhrLiteIcureLabel)\ncustomElements.define('icure-button', EhrLiteIcureButton)\ncustomElements.define('icure-text-field', EhrLiteIcureTextField)\ncustomElements.define('icure-form-items-list-field', ItemsListField)\ncustomElements.define('icure-form-label', EhrLiteLabel)\ncustomElements.define('icure-form-button', EhrLiteButton)\ncustomElements.define('icure-form-measure-field', MeasureField)\ncustomElements.define('icure-form-number-field', NumberField)\ncustomElements.define('icure-form-radio-button', RadioButton)\ncustomElements.define('icure-form-text-field', TextField)\ncustomElements.define('icure-form-time-picker', TimePicker)\ncustomElements.define('icure-form-token-field', TokenField)\ncustomElements.define('form-selection-button', FormSelectionButton)\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../tmp/components/themes/icure-blue/index.ts"],"names":[],"mappings":";;AAAA,oDAcgC;AAChC,iEAA2D;AAC3D,+DAA8D;AAC9D,qEAA+D;AAC/D,iDAA4C;AAC5C,mDAA8C;AAC9C,6DAAiF;AAEjF,aAAa;AACb,6BAA0B;AAC1B,MAAM,UAAU,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0VpB,CAAA;AACF,4EAAqE;AACrE,qDAAgD;AAChD,gGAA0F;AAE1F,MAAM,uBAAwB,SAAQ,qCAAgB;IACrD,MAAM,KAAK,MAAM;QAChB,OAAO,CAAC,GAAG,qCAAgB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAChD,CAAC;CACD;AACD,MAAM,2BAA4B,SAAQ,wCAAoB;IAC7D,MAAM,KAAK,MAAM;QAChB,OAAO,CAAC,GAAG,wCAAoB,CAAC,MAAM,EAAE,UAAU,CAA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MAAM,CAAC,wBAAwB,EAAE,mBAAU,CAAC,CAAA;AAC3D,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,mBAAU,CAAC,CAAA;AAC3D,cAAc,CAAC,MAAM,CAAC,uBAAuB,EAAE,2CAAmB,CAAC,CAAA","sourcesContent":["import {\n\tCheckBox,\n\tDatePicker,\n\tDateTimePicker,\n\tDropdownField,\n\tItemsListField,\n\tLabel,\n\tButton,\n\tMeasureField,\n\tNumberField,\n\tRadioButton,\n\tTextField,\n\tTimePicker,\n\tTokenField,\n} from '../../icure-form/fields'\nimport { IcureButtonGroup } from '../../icure-button-group'\nimport { IcureDatePickerField } from '../../icure-date-picker'\nimport { IcureDropdownField } from '../../icure-dropdown-field'\nimport { IcureForm } from '../../icure-form'\nimport { IcureLabel } from '../../icure-label'\nimport { IcureTextField, MetadataButtonBarWrapper } from '../../icure-text-field'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst ehrLiteCss = css`.tab-container {\n display: flex;\n flex-direction: column;\n}\n.tab-container .tab-bar {\n display: flex;\n align-self: stretch;\n padding: 0;\n}\n.tab-container .tab-bar ul {\n width: 100%;\n display: flex;\n align-items: flex-end;\n justify-content: flex-start;\n align-self: stretch;\n padding: 0;\n margin: 0;\n gap: 2px;\n box-sizing: border-box;\n position: relative;\n}\n.tab-container .tab-bar ul:before {\n border-bottom: 1px solid #DCE7F2;\n content: \"\";\n left: 0;\n position: absolute;\n right: 0;\n}\n.tab-container .tab-bar li {\n display: inline-block;\n padding: 8px 16px;\n cursor: pointer;\n color: #303443;\n font-size: 14px;\n font-weight: 400;\n border-radius: 8px 8px 0px 0px;\n z-index: 2;\n border-bottom: 2px solid transparent;\n}\n.tab-container .tab-bar li.active {\n background-color: white;\n border-bottom: 2px solid #084B83;\n color: #084B83;\n font-weight: 600;\n}\n.tab-container .tab-content {\n padding-top: 8px;\n}\n.tab-container .tab-content .tab {\n display: none;\n}\n.tab-container .tab-content .tab.active {\n display: block;\n}\n\n.icure-text-field,\n.icure-button-group {\n width: 100%;\n}\n.icure-text-field .icure-label,\n.icure-button-group .icure-label {\n color: #1D2235;\n font-size: 14px;\n font-weight: 400;\n}\n.icure-text-field .icure-label > span,\n.icure-button-group .icure-label > span {\n display: block;\n word-wrap: break-word;\n overflow: auto;\n font-weight: 400;\n}\n.icure-text-field > .icure-input,\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container,\n.icure-button-group .icure-input,\n.icure-button-group .input-container {\n cursor: pointer;\n border-radius: 6px;\n padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 13px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: #DDE3E7;\n color: #1D2235;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError,\n.icure-button-group .icure-input__validationError,\n.icure-button-group .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .input-container__withMetadata,\n.icure-button-group .icure-input__withMetadata,\n.icure-button-group .input-container__withMetadata {\n border-radius: 6px 0 0 6px;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within,\n.icure-button-group .icure-input:focus,\n.icure-button-group .icure-input:focus-within,\n.icure-button-group .input-container:focus,\n.icure-button-group .input-container:focus-within {\n box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);\n border-color: #084B83;\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover,\n.icure-button-group .icure-input:hover,\n.icure-button-group .input-container:hover {\n border-color: #084B83;\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within,\n.icure-button-group .icure-input:hover:focus,\n.icure-button-group .icure-input:hover:focus-within,\n.icure-button-group .input-container:hover:focus,\n.icure-button-group .input-container:hover:focus-within {\n box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);\n border-color: #084B83;\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror,\n.icure-button-group .icure-input .ProseMirror,\n.icure-button-group .input-container .ProseMirror {\n padding: 0;\n font-size: 13px;\n line-height: 1.4em;\n color: #1D2235;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date,\n.icure-button-group .icure-input .ProseMirror .date,\n.icure-button-group .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time,\n.icure-button-group .icure-input .ProseMirror .time,\n.icure-button-group .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused, .icure-text-field .icure-input .ProseMirror:hover,\n.icure-text-field .input-container .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:hover,\n.icure-button-group .icure-input .ProseMirror:focus .focused,\n.icure-button-group .icure-input .ProseMirror:hover,\n.icure-button-group .input-container .ProseMirror:focus .focused,\n.icure-button-group .input-container .ProseMirror:hover {\n border-color: #084B83;\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg,\n.icure-button-group .icure-input > svg,\n.icure-button-group .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path,\n.icure-button-group .icure-input > svg path,\n.icure-button-group .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra,\n.icure-button-group .icure-input .extra,\n.icure-button-group .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info,\n.icure-button-group .icure-input .extra > .info,\n.icure-button-group .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path,\n.icure-button-group .icure-input .extra .buttons-container .btn svg path,\n.icure-button-group .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover,\n.icure-button-group .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-button-group .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n.icure-text-field .icure-input .extra > .options > .selected,\n.icure-text-field .input-container .extra > .options > .selected,\n.icure-button-group .icure-input .extra > .options > .selected,\n.icure-button-group .input-container .extra > .options > .selected {\n color: white;\n background-color: #084B83;\n}\n\n.icure-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n cursor: pointer;\n}\n.menu-container .item.existing {\n background-color: #BFE8EA;\n}\n.menu-container .item.selected {\n color: white;\n background-color: #084B83;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:hover {\n border-color: #DCE7F2;\n}\n.icure-checkbox:checked {\n accent-color: #084B83;\n}\n\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: add-three(1.4em, 1px, 0);\n left: add-two(8px, 1px);\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #1D2235;\n display: flex;\n align-items: center;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n\n.icure-input #editor {\n color: #1D2235;\n}\n.icure-input #editor.tokens-list .ProseMirror li, .icure-input #editor.styled-tokens-list .ProseMirror li {\n background-color: #DCE7F2;\n}\n.icure-input #editor.tokens-list .ProseMirror li span:after, .icure-input #editor.styled-tokens-list .ProseMirror li span:after {\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n}\n.icure-input #editor.items-list .ProseMirror li {\n border-bottom: 1px dotted #8DA6BF;\n}\n.icure-input .select-arrow {\n opacity: 1;\n}\n.icure-input .select-arrow svg {\n width: 15px;\n height: 15px;\n}\n.icure-input .select-arrow svg path {\n fill: #9CA8B2;\n}\n.icure-input .options {\n padding: 2px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n border-radius: 6px;\n background: white;\n box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 0px rgba(0, 0, 0, 0.05);\n}\n.icure-input .options .option {\n height: auto;\n min-height: unset;\n display: flex;\n padding: 8px;\n align-items: center;\n align-self: stretch;\n border-radius: 4px;\n background: white;\n color: #1D2235;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n cursor: pointer;\n}\n.icure-input .options .option:hover {\n background: #DCE7F2;\n color: #084B83;\n}\n.icure-input:hover .select-arrow svg path, .icure-input:focus .select-arrow svg path {\n fill: #084B83;\n}` \nimport { MetadataButtonBar } from '../../common/metadata-buttons-bar'\nimport { IcureButton } from '../../icure-button'\nimport { FormSelectionButton } from '../../icure-form/renderer/form/form-selection-button'\n\nclass EhrLiteIcureButtonGroup extends IcureButtonGroup {\n\tstatic get styles() {\n\t\treturn [...IcureButtonGroup.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureDatePickerField extends IcureDatePickerField {\n\tstatic get styles() {\n\t\treturn [...IcureDatePickerField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureDropdownField extends IcureDropdownField {\n\tstatic get styles() {\n\t\treturn [...IcureDropdownField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureForm extends IcureForm {\n\tstatic get styles() {\n\t\treturn [...IcureForm.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureLabel extends IcureLabel {\n\tstatic get styles() {\n\t\treturn [...IcureLabel.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureButton extends IcureButton {\n\tstatic get styles() {\n\t\treturn [...IcureButton.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureTextField extends IcureTextField {\n\tstatic get styles() {\n\t\treturn [...IcureTextField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteLabel extends Label {\n\tstatic get styles() {\n\t\treturn [...Label.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteMetadataButtonBar extends MetadataButtonBar {\n\tstatic get styles() {\n\t\treturn [...MetadataButtonBar.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteButton extends Button {\n\tstatic get styles() {\n\t\treturn [...Button.styles, ehrLiteCss]\n\t}\n}\n\ncustomElements.define('icure-metadata-buttons-bar', EhrLiteMetadataButtonBar)\ncustomElements.define('icure-metadata-buttons-bar-wrapper', MetadataButtonBarWrapper)\n\ncustomElements.define('icure-form-checkbox', CheckBox)\ncustomElements.define('icure-form-date-picker', DatePicker)\ncustomElements.define('icure-form-date-time-picker', DateTimePicker)\ncustomElements.define('icure-form-dropdown-field', DropdownField)\ncustomElements.define('icure-button-group', EhrLiteIcureButtonGroup)\ncustomElements.define('icure-date-picker-field', EhrLiteIcureDatePickerField)\ncustomElements.define('icure-dropdown-field', EhrLiteIcureDropdownField)\ncustomElements.define('icure-form', EhrLiteIcureForm)\ncustomElements.define('icure-label', EhrLiteIcureLabel)\ncustomElements.define('icure-button', EhrLiteIcureButton)\ncustomElements.define('icure-text-field', EhrLiteIcureTextField)\ncustomElements.define('icure-form-items-list-field', ItemsListField)\ncustomElements.define('icure-form-label', EhrLiteLabel)\ncustomElements.define('icure-form-button', EhrLiteButton)\ncustomElements.define('icure-form-measure-field', MeasureField)\ncustomElements.define('icure-form-number-field', NumberField)\ncustomElements.define('icure-form-radio-button', RadioButton)\ncustomElements.define('icure-form-text-field', TextField)\ncustomElements.define('icure-form-time-picker', TimePicker)\ncustomElements.define('icure-form-token-field', TokenField)\ncustomElements.define('form-selection-button', FormSelectionButton)\n"]}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fields_1 = require("../../icure-form/fields");
|
|
4
|
+
const icure_button_group_1 = require("../../icure-button-group");
|
|
5
|
+
const icure_date_picker_1 = require("../../icure-date-picker");
|
|
6
|
+
const icure_dropdown_field_1 = require("../../icure-dropdown-field");
|
|
7
|
+
const icure_form_1 = require("../../icure-form");
|
|
8
|
+
const icure_label_1 = require("../../icure-label");
|
|
9
|
+
const icure_text_field_1 = require("../../icure-text-field");
|
|
8
10
|
// @ts-ignore
|
|
9
|
-
|
|
10
|
-
const kendoCss = css `.
|
|
11
|
+
const lit_1 = require("lit");
|
|
12
|
+
const kendoCss = (0, lit_1.css) `.tab-container .tab-bar li.active {
|
|
13
|
+
background-color: #656565;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icure-text-field,
|
|
11
17
|
.icure-button-group {
|
|
12
18
|
padding-top: 16px;
|
|
13
19
|
width: 100%;
|
|
@@ -179,8 +185,8 @@ app-date-picker {
|
|
|
179
185
|
line-height: 1.4em;
|
|
180
186
|
cursor: text;
|
|
181
187
|
font-size: 14px;
|
|
182
|
-
top:
|
|
183
|
-
left:
|
|
188
|
+
top: add-three(1.4em, 1px, 0);
|
|
189
|
+
left: add-two(8px, 1px);
|
|
184
190
|
color: #656565;
|
|
185
191
|
align-items: center;
|
|
186
192
|
height: 28px;
|
|
@@ -206,8 +212,8 @@ app-date-picker {
|
|
|
206
212
|
line-height: 1.4em;
|
|
207
213
|
cursor: text;
|
|
208
214
|
font-size: 14px;
|
|
209
|
-
top:
|
|
210
|
-
left:
|
|
215
|
+
top: add-three(1.4em, 1px, 0);
|
|
216
|
+
left: add-two(8px, 1px);
|
|
211
217
|
transition: transform 0.2s ease-out, color 0.2s ease-out;
|
|
212
218
|
color: #656565;
|
|
213
219
|
display: flex;
|
|
@@ -227,65 +233,65 @@ app-date-picker {
|
|
|
227
233
|
flex: 1 1 auto;
|
|
228
234
|
width: auto;
|
|
229
235
|
}`;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
class KendoIcureButtonGroup extends IcureButtonGroup {
|
|
236
|
+
const metadata_buttons_bar_1 = require("../../common/metadata-buttons-bar");
|
|
237
|
+
const icure_button_1 = require("../../icure-button");
|
|
238
|
+
const form_selection_button_1 = require("../../icure-form/renderer/form/form-selection-button");
|
|
239
|
+
class KendoIcureButtonGroup extends icure_button_group_1.IcureButtonGroup {
|
|
234
240
|
static get styles() {
|
|
235
|
-
return [...IcureButtonGroup.styles, kendoCss];
|
|
241
|
+
return [...icure_button_group_1.IcureButtonGroup.styles, kendoCss];
|
|
236
242
|
}
|
|
237
243
|
}
|
|
238
|
-
class KendoIcureDatePickerField extends IcureDatePickerField {
|
|
244
|
+
class KendoIcureDatePickerField extends icure_date_picker_1.IcureDatePickerField {
|
|
239
245
|
static get styles() {
|
|
240
|
-
return [...IcureDatePickerField.styles, kendoCss];
|
|
246
|
+
return [...icure_date_picker_1.IcureDatePickerField.styles, kendoCss];
|
|
241
247
|
}
|
|
242
248
|
}
|
|
243
|
-
class KendoIcureDropdownField extends IcureDropdownField {
|
|
249
|
+
class KendoIcureDropdownField extends icure_dropdown_field_1.IcureDropdownField {
|
|
244
250
|
static get styles() {
|
|
245
|
-
return [...IcureDropdownField.styles, kendoCss];
|
|
251
|
+
return [...icure_dropdown_field_1.IcureDropdownField.styles, kendoCss];
|
|
246
252
|
}
|
|
247
253
|
}
|
|
248
|
-
class KendoIcureForm extends IcureForm {
|
|
254
|
+
class KendoIcureForm extends icure_form_1.IcureForm {
|
|
249
255
|
static get styles() {
|
|
250
|
-
return [...IcureForm.styles, kendoCss];
|
|
256
|
+
return [...icure_form_1.IcureForm.styles, kendoCss];
|
|
251
257
|
}
|
|
252
258
|
}
|
|
253
|
-
class KendoIcureLabel extends IcureLabel {
|
|
259
|
+
class KendoIcureLabel extends icure_label_1.IcureLabel {
|
|
254
260
|
static get styles() {
|
|
255
|
-
return [...IcureLabel.styles, kendoCss];
|
|
261
|
+
return [...icure_label_1.IcureLabel.styles, kendoCss];
|
|
256
262
|
}
|
|
257
263
|
}
|
|
258
|
-
class KendoIcureButton extends IcureButton {
|
|
264
|
+
class KendoIcureButton extends icure_button_1.IcureButton {
|
|
259
265
|
static get styles() {
|
|
260
|
-
return [...IcureButton.styles, kendoCss];
|
|
266
|
+
return [...icure_button_1.IcureButton.styles, kendoCss];
|
|
261
267
|
}
|
|
262
268
|
}
|
|
263
|
-
class KendoIcureTextField extends IcureTextField {
|
|
269
|
+
class KendoIcureTextField extends icure_text_field_1.IcureTextField {
|
|
264
270
|
static get styles() {
|
|
265
|
-
return [...IcureTextField.styles, kendoCss];
|
|
271
|
+
return [...icure_text_field_1.IcureTextField.styles, kendoCss];
|
|
266
272
|
}
|
|
267
273
|
}
|
|
268
|
-
class KendoLabel extends Label {
|
|
274
|
+
class KendoLabel extends fields_1.Label {
|
|
269
275
|
static get styles() {
|
|
270
|
-
return [...Label.styles, kendoCss];
|
|
276
|
+
return [...fields_1.Label.styles, kendoCss];
|
|
271
277
|
}
|
|
272
278
|
}
|
|
273
|
-
class KendoMetadataButtonBar extends MetadataButtonBar {
|
|
279
|
+
class KendoMetadataButtonBar extends metadata_buttons_bar_1.MetadataButtonBar {
|
|
274
280
|
static get styles() {
|
|
275
|
-
return [...MetadataButtonBar.styles, kendoCss];
|
|
281
|
+
return [...metadata_buttons_bar_1.MetadataButtonBar.styles, kendoCss];
|
|
276
282
|
}
|
|
277
283
|
}
|
|
278
|
-
class KendoButton extends Button {
|
|
284
|
+
class KendoButton extends fields_1.Button {
|
|
279
285
|
static get styles() {
|
|
280
|
-
return [...Button.styles, kendoCss];
|
|
286
|
+
return [...fields_1.Button.styles, kendoCss];
|
|
281
287
|
}
|
|
282
288
|
}
|
|
283
289
|
customElements.define('icure-metadata-buttons-bar', KendoMetadataButtonBar);
|
|
284
|
-
customElements.define('icure-metadata-buttons-bar-wrapper', MetadataButtonBarWrapper);
|
|
285
|
-
customElements.define('icure-form-checkbox', CheckBox);
|
|
286
|
-
customElements.define('icure-form-date-picker', DatePicker);
|
|
287
|
-
customElements.define('icure-form-date-time-picker', DateTimePicker);
|
|
288
|
-
customElements.define('icure-form-dropdown-field', DropdownField);
|
|
290
|
+
customElements.define('icure-metadata-buttons-bar-wrapper', icure_text_field_1.MetadataButtonBarWrapper);
|
|
291
|
+
customElements.define('icure-form-checkbox', fields_1.CheckBox);
|
|
292
|
+
customElements.define('icure-form-date-picker', fields_1.DatePicker);
|
|
293
|
+
customElements.define('icure-form-date-time-picker', fields_1.DateTimePicker);
|
|
294
|
+
customElements.define('icure-form-dropdown-field', fields_1.DropdownField);
|
|
289
295
|
customElements.define('icure-button-group', KendoIcureButtonGroup);
|
|
290
296
|
customElements.define('icure-date-picker-field', KendoIcureDatePickerField);
|
|
291
297
|
customElements.define('icure-dropdown-field', KendoIcureDropdownField);
|
|
@@ -293,14 +299,14 @@ customElements.define('icure-form', KendoIcureForm);
|
|
|
293
299
|
customElements.define('icure-label', KendoIcureLabel);
|
|
294
300
|
customElements.define('icure-button', KendoIcureButton);
|
|
295
301
|
customElements.define('icure-text-field', KendoIcureTextField);
|
|
296
|
-
customElements.define('icure-form-items-list-field', ItemsListField);
|
|
302
|
+
customElements.define('icure-form-items-list-field', fields_1.ItemsListField);
|
|
297
303
|
customElements.define('icure-form-label', KendoLabel);
|
|
298
304
|
customElements.define('icure-form-button', KendoButton);
|
|
299
|
-
customElements.define('icure-form-measure-field', MeasureField);
|
|
300
|
-
customElements.define('icure-form-number-field', NumberField);
|
|
301
|
-
customElements.define('icure-form-radio-button', RadioButton);
|
|
302
|
-
customElements.define('icure-form-text-field', TextField);
|
|
303
|
-
customElements.define('icure-form-time-picker', TimePicker);
|
|
304
|
-
customElements.define('icure-form-token-field', TokenField);
|
|
305
|
-
customElements.define('form-selection-button', FormSelectionButton);
|
|
305
|
+
customElements.define('icure-form-measure-field', fields_1.MeasureField);
|
|
306
|
+
customElements.define('icure-form-number-field', fields_1.NumberField);
|
|
307
|
+
customElements.define('icure-form-radio-button', fields_1.RadioButton);
|
|
308
|
+
customElements.define('icure-form-text-field', fields_1.TextField);
|
|
309
|
+
customElements.define('icure-form-time-picker', fields_1.TimePicker);
|
|
310
|
+
customElements.define('icure-form-token-field', fields_1.TokenField);
|
|
311
|
+
customElements.define('form-selection-button', form_selection_button_1.FormSelectionButton);
|
|
306
312
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../tmp/components/themes/kendo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,QAAQ,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,KAAK,EACL,MAAM,EACN,YAAY,EACZ,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,GACV,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAEjF,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,QAAQ,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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9D,cAAc,CAAC,MAAM,CAAC,6BAA6B,EAAE,cAAc,CAAC,CAAA;AACpE,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAA;AACrD,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAA;AACvD,cAAc,CAAC,MAAM,CAAC,0BAA0B,EAAE,YAAY,CAAC,CAAA;AAC/D,cAAc,CAAC,MAAM,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAA;AAC7D,cAAc,CAAC,MAAM,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAA;AAC7D,cAAc,CAAC,MAAM,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAA;AACzD,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAA;AAC3D,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAA;AAC3D,cAAc,CAAC,MAAM,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAA","sourcesContent":["import {\n\tCheckBox,\n\tDatePicker,\n\tDateTimePicker,\n\tDropdownField,\n\tItemsListField,\n\tLabel,\n\tButton,\n\tMeasureField,\n\tNumberField,\n\tRadioButton,\n\tTextField,\n\tTimePicker,\n\tTokenField,\n} from '../../icure-form/fields'\nimport { IcureButtonGroup } from '../../icure-button-group'\nimport { IcureDatePickerField } from '../../icure-date-picker'\nimport { IcureDropdownField } from '../../icure-dropdown-field'\nimport { IcureForm } from '../../icure-form'\nimport { IcureLabel } from '../../icure-label'\nimport { IcureTextField, MetadataButtonBarWrapper } from '../../icure-text-field'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst kendoCss = css`.icure-text-field,\n.icure-button-group {\n padding-top: 16px;\n width: 100%;\n}\n.icure-text-field .icure-label,\n.icure-button-group .icure-label {\n color: #656565;\n font-size: 14px;\n font-weight: 500;\n display: inline !important;\n white-space: initial !important;\n overflow: initial !important;\n word-wrap: normal !important;\n word-break: break-word;\n}\n.icure-text-field > .icure-input,\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label,\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container,\n.icure-button-group .icure-input,\n.icure-button-group .input-container {\n border-radius: 2px;\n padding: 0 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: rgba(0, 0, 0, 0.08);\n color: #656565;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within,\n.icure-button-group .icure-input:focus,\n.icure-button-group .icure-input:focus-within,\n.icure-button-group .input-container:focus,\n.icure-button-group .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover,\n.icure-button-group .icure-input:hover,\n.icure-button-group .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within,\n.icure-button-group .icure-input:hover:focus,\n.icure-button-group .icure-input:hover:focus-within,\n.icure-button-group .input-container:hover:focus,\n.icure-button-group .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror,\n.icure-button-group .icure-input .ProseMirror,\n.icure-button-group .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #656565;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date,\n.icure-button-group .icure-input .ProseMirror .date,\n.icure-button-group .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time,\n.icure-button-group .icure-input .ProseMirror .time,\n.icure-button-group .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:focus .focused,\n.icure-button-group .icure-input .ProseMirror:focus .focused,\n.icure-button-group .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg,\n.icure-button-group .icure-input > svg,\n.icure-button-group .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path,\n.icure-button-group .icure-input > svg path,\n.icure-button-group .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra,\n.icure-button-group .icure-input .extra,\n.icure-button-group .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info,\n.icure-button-group .icure-input .extra > .info,\n.icure-button-group .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path,\n.icure-button-group .icure-input .extra .buttons-container .btn svg path,\n.icure-button-group .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover,\n.icure-button-group .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-button-group .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n.icure-text-field .icure-input .extra > .options > .selected,\n.icure-text-field .input-container .extra > .options > .selected,\n.icure-button-group .icure-input .extra > .options > .selected,\n.icure-button-group .input-container .extra > .options > .selected {\n color: white;\n background-color: #06a070;\n border-radius: 0 !important;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:checked {\n accent-color: #06a070;\n}\n\napp-date-picker {\n --app-primary: #06a070;\n --app-hover: #06a070;\n --app-selected-hover: #06a070;\n}\n\n.icure-button-group > .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: calc(1.4em + 1px);\n left: 9px;\n color: #656565;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > .icure-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: calc(1.4em + 1px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #656565;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}` \nimport { MetadataButtonBar } from '../../common/metadata-buttons-bar'\nimport { IcureButton } from '../../icure-button'\nimport { FormSelectionButton } from '../../icure-form/renderer/form/form-selection-button'\n\nclass KendoIcureButtonGroup extends IcureButtonGroup {\n\tstatic get styles() {\n\t\treturn [...IcureButtonGroup.styles, kendoCss]\n\t}\n}\nclass KendoIcureDatePickerField extends IcureDatePickerField {\n\tstatic get styles() {\n\t\treturn [...IcureDatePickerField.styles, kendoCss]\n\t}\n}\nclass KendoIcureDropdownField extends IcureDropdownField {\n\tstatic get styles() {\n\t\treturn [...IcureDropdownField.styles, kendoCss]\n\t}\n}\nclass KendoIcureForm extends IcureForm {\n\tstatic get styles() {\n\t\treturn [...IcureForm.styles, kendoCss]\n\t}\n}\nclass KendoIcureLabel extends IcureLabel {\n\tstatic get styles() {\n\t\treturn [...IcureLabel.styles, kendoCss]\n\t}\n}\nclass KendoIcureButton extends IcureButton {\n\tstatic get styles() {\n\t\treturn [...IcureButton.styles, kendoCss]\n\t}\n}\nclass KendoIcureTextField extends IcureTextField {\n\tstatic get styles() {\n\t\treturn [...IcureTextField.styles, kendoCss]\n\t}\n}\nclass KendoLabel extends Label {\n\tstatic get styles() {\n\t\treturn [...Label.styles, kendoCss]\n\t}\n}\nclass KendoMetadataButtonBar extends MetadataButtonBar {\n\tstatic get styles() {\n\t\treturn [...MetadataButtonBar.styles, kendoCss]\n\t}\n}\nclass KendoButton extends Button {\n\tstatic get styles() {\n\t\treturn [...Button.styles, kendoCss]\n\t}\n}\n\ncustomElements.define('icure-metadata-buttons-bar', KendoMetadataButtonBar)\ncustomElements.define('icure-metadata-buttons-bar-wrapper', MetadataButtonBarWrapper)\n\ncustomElements.define('icure-form-checkbox', CheckBox)\ncustomElements.define('icure-form-date-picker', DatePicker)\ncustomElements.define('icure-form-date-time-picker', DateTimePicker)\ncustomElements.define('icure-form-dropdown-field', DropdownField)\ncustomElements.define('icure-button-group', KendoIcureButtonGroup)\ncustomElements.define('icure-date-picker-field', KendoIcureDatePickerField)\ncustomElements.define('icure-dropdown-field', KendoIcureDropdownField)\ncustomElements.define('icure-form', KendoIcureForm)\ncustomElements.define('icure-label', KendoIcureLabel)\ncustomElements.define('icure-button', KendoIcureButton)\ncustomElements.define('icure-text-field', KendoIcureTextField)\ncustomElements.define('icure-form-items-list-field', ItemsListField)\ncustomElements.define('icure-form-label', KendoLabel)\ncustomElements.define('icure-form-button', KendoButton)\ncustomElements.define('icure-form-measure-field', MeasureField)\ncustomElements.define('icure-form-number-field', NumberField)\ncustomElements.define('icure-form-radio-button', RadioButton)\ncustomElements.define('icure-form-text-field', TextField)\ncustomElements.define('icure-form-time-picker', TimePicker)\ncustomElements.define('icure-form-token-field', TokenField)\ncustomElements.define('form-selection-button', FormSelectionButton)\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../tmp/components/themes/kendo/index.ts"],"names":[],"mappings":";;AAAA,oDAcgC;AAChC,iEAA2D;AAC3D,+DAA8D;AAC9D,qEAA+D;AAC/D,iDAA4C;AAC5C,mDAA8C;AAC9C,6DAAiF;AAEjF,aAAa;AACb,6BAA0B;AAC1B,MAAM,QAAQ,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+NlB,CAAA;AACF,4EAAqE;AACrE,qDAAgD;AAChD,gGAA0F;AAE1F,MAAM,qBAAsB,SAAQ,qCAAgB;IACnD,MAAM,KAAK,MAAM;QAChB,OAAO,CAAC,GAAG,qCAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC9C,CAAC;CACD;AACD,MAAM,yBAA0B,SAAQ,wCAAoB;IAC3D,MAAM,KAAK,MAAM;QAChB,OAAO,CAAC,GAAG,wCAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAClD,CAAC;CACD;AACD,MAAM,uBAAwB,SAAQ,yCAAkB;IACvD,MAAM,KAAK,MAAM;QAChB,OAAO,CAAC,GAAG,yCAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAChD,CAAC;CACD;AACD,MAAM,cA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Content":["import {\n\tCheckBox,\n\tDatePicker,\n\tDateTimePicker,\n\tDropdownField,\n\tItemsListField,\n\tLabel,\n\tButton,\n\tMeasureField,\n\tNumberField,\n\tRadioButton,\n\tTextField,\n\tTimePicker,\n\tTokenField,\n} from '../../icure-form/fields'\nimport { IcureButtonGroup } from '../../icure-button-group'\nimport { IcureDatePickerField } from '../../icure-date-picker'\nimport { IcureDropdownField } from '../../icure-dropdown-field'\nimport { IcureForm } from '../../icure-form'\nimport { IcureLabel } from '../../icure-label'\nimport { IcureTextField, MetadataButtonBarWrapper } from '../../icure-text-field'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst kendoCss = css`.tab-container .tab-bar li.active {\n background-color: #656565;\n}\n\n.icure-text-field,\n.icure-button-group {\n padding-top: 16px;\n width: 100%;\n}\n.icure-text-field .icure-label,\n.icure-button-group .icure-label {\n color: #656565;\n font-size: 14px;\n font-weight: 500;\n display: inline !important;\n white-space: initial !important;\n overflow: initial !important;\n word-wrap: normal !important;\n word-break: break-word;\n}\n.icure-text-field > .icure-input,\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label,\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container,\n.icure-button-group .icure-input,\n.icure-button-group .input-container {\n border-radius: 2px;\n padding: 0 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: rgba(0, 0, 0, 0.08);\n color: #656565;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within,\n.icure-button-group .icure-input:focus,\n.icure-button-group .icure-input:focus-within,\n.icure-button-group .input-container:focus,\n.icure-button-group .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover,\n.icure-button-group .icure-input:hover,\n.icure-button-group .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within,\n.icure-button-group .icure-input:hover:focus,\n.icure-button-group .icure-input:hover:focus-within,\n.icure-button-group .input-container:hover:focus,\n.icure-button-group .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror,\n.icure-button-group .icure-input .ProseMirror,\n.icure-button-group .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #656565;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date,\n.icure-button-group .icure-input .ProseMirror .date,\n.icure-button-group .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time,\n.icure-button-group .icure-input .ProseMirror .time,\n.icure-button-group .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:focus .focused,\n.icure-button-group .icure-input .ProseMirror:focus .focused,\n.icure-button-group .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg,\n.icure-button-group .icure-input > svg,\n.icure-button-group .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path,\n.icure-button-group .icure-input > svg path,\n.icure-button-group .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra,\n.icure-button-group .icure-input .extra,\n.icure-button-group .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info,\n.icure-button-group .icure-input .extra > .info,\n.icure-button-group .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path,\n.icure-button-group .icure-input .extra .buttons-container .btn svg path,\n.icure-button-group .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover,\n.icure-button-group .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-button-group .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n.icure-text-field .icure-input .extra > .options > .selected,\n.icure-text-field .input-container .extra > .options > .selected,\n.icure-button-group .icure-input .extra > .options > .selected,\n.icure-button-group .input-container .extra > .options > .selected {\n color: white;\n background-color: #06a070;\n border-radius: 0 !important;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:checked {\n accent-color: #06a070;\n}\n\napp-date-picker {\n --app-primary: #06a070;\n --app-hover: #06a070;\n --app-selected-hover: #06a070;\n}\n\n.icure-button-group > .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: add-three(1.4em, 1px, 0);\n left: add-two(8px, 1px);\n color: #656565;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > .icure-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: add-three(1.4em, 1px, 0);\n left: add-two(8px, 1px);\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #656565;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}` \nimport { MetadataButtonBar } from '../../common/metadata-buttons-bar'\nimport { IcureButton } from '../../icure-button'\nimport { FormSelectionButton } from '../../icure-form/renderer/form/form-selection-button'\n\nclass KendoIcureButtonGroup extends IcureButtonGroup {\n\tstatic get styles() {\n\t\treturn [...IcureButtonGroup.styles, kendoCss]\n\t}\n}\nclass KendoIcureDatePickerField extends IcureDatePickerField {\n\tstatic get styles() {\n\t\treturn [...IcureDatePickerField.styles, kendoCss]\n\t}\n}\nclass KendoIcureDropdownField extends IcureDropdownField {\n\tstatic get styles() {\n\t\treturn [...IcureDropdownField.styles, kendoCss]\n\t}\n}\nclass KendoIcureForm extends IcureForm {\n\tstatic get styles() {\n\t\treturn [...IcureForm.styles, kendoCss]\n\t}\n}\nclass KendoIcureLabel extends IcureLabel {\n\tstatic get styles() {\n\t\treturn [...IcureLabel.styles, kendoCss]\n\t}\n}\nclass KendoIcureButton extends IcureButton {\n\tstatic get styles() {\n\t\treturn [...IcureButton.styles, kendoCss]\n\t}\n}\nclass KendoIcureTextField extends IcureTextField {\n\tstatic get styles() {\n\t\treturn [...IcureTextField.styles, kendoCss]\n\t}\n}\nclass KendoLabel extends Label {\n\tstatic get styles() {\n\t\treturn [...Label.styles, kendoCss]\n\t}\n}\nclass KendoMetadataButtonBar extends MetadataButtonBar {\n\tstatic get styles() {\n\t\treturn [...MetadataButtonBar.styles, kendoCss]\n\t}\n}\nclass KendoButton extends Button {\n\tstatic get styles() {\n\t\treturn [...Button.styles, kendoCss]\n\t}\n}\n\ncustomElements.define('icure-metadata-buttons-bar', KendoMetadataButtonBar)\ncustomElements.define('icure-metadata-buttons-bar-wrapper', MetadataButtonBarWrapper)\n\ncustomElements.define('icure-form-checkbox', CheckBox)\ncustomElements.define('icure-form-date-picker', DatePicker)\ncustomElements.define('icure-form-date-time-picker', DateTimePicker)\ncustomElements.define('icure-form-dropdown-field', DropdownField)\ncustomElements.define('icure-button-group', KendoIcureButtonGroup)\ncustomElements.define('icure-date-picker-field', KendoIcureDatePickerField)\ncustomElements.define('icure-dropdown-field', KendoIcureDropdownField)\ncustomElements.define('icure-form', KendoIcureForm)\ncustomElements.define('icure-label', KendoIcureLabel)\ncustomElements.define('icure-button', KendoIcureButton)\ncustomElements.define('icure-text-field', KendoIcureTextField)\ncustomElements.define('icure-form-items-list-field', ItemsListField)\ncustomElements.define('icure-form-label', KendoLabel)\ncustomElements.define('icure-form-button', KendoButton)\ncustomElements.define('icure-form-measure-field', MeasureField)\ncustomElements.define('icure-form-number-field', NumberField)\ncustomElements.define('icure-form-radio-button', RadioButton)\ncustomElements.define('icure-form-text-field', TextField)\ncustomElements.define('icure-form-time-picker', TimePicker)\ncustomElements.define('icure-form-token-field', TokenField)\ncustomElements.define('form-selection-button', FormSelectionButton)\n"]}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.cluster = void 0;
|
|
7
|
+
const ckmeans_1 = __importDefault(require("./ckmeans"));
|
|
8
|
+
const cluster = (data, maxDistanceInCluster, minDistanceBetweenClusters, slots) => {
|
|
3
9
|
if (!data.length) {
|
|
4
10
|
return { centroids: [], clusters: [] };
|
|
5
11
|
}
|
|
@@ -11,7 +17,7 @@ export const cluster = (data, maxDistanceInCluster, minDistanceBetweenClusters,
|
|
|
11
17
|
while (isNotStable) {
|
|
12
18
|
history.push(k);
|
|
13
19
|
isNotStable = false;
|
|
14
|
-
clusters =
|
|
20
|
+
clusters = (0, ckmeans_1.default)(data, k);
|
|
15
21
|
if (clusters.find((c) => !c.length)) {
|
|
16
22
|
isNotStable = true;
|
|
17
23
|
k--;
|
|
@@ -43,4 +49,5 @@ export const cluster = (data, maxDistanceInCluster, minDistanceBetweenClusters,
|
|
|
43
49
|
}
|
|
44
50
|
return { centroids: centroids, clusters: clusters };
|
|
45
51
|
};
|
|
52
|
+
exports.cluster = cluster;
|
|
46
53
|
//# sourceMappingURL=ckmeans-grouping.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ckmeans-grouping.js","sourceRoot":"","sources":["../../tmp/conversion/ckmeans-grouping.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ckmeans-grouping.js","sourceRoot":"","sources":["../../tmp/conversion/ckmeans-grouping.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA+B;AAExB,MAAM,OAAO,GAAG,CAAC,IAAc,EAAE,oBAA4B,EAAE,0BAAkC,EAAE,KAAc,EAAE,EAAE;IAC3H,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;IACvC,CAAC;IAED,IAAI,CAAC,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,CAAC,iFAAiF;IAE3I,MAAM,OAAO,GAAG,EAAE,CAAA;IAClB,IAAI,WAAW,GAAG,IAAI,CAAA;IACtB,IAAI,SAAS,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AI,WAAW,EAAE,CAAC;YACjB,SAAQ;QACT,CAAC;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1C,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;YAC5F,IAAI,WAAW,GAAG,oBAAoB,EAAE,CAAC;gBACxC,WAAW,GAAG,IAAI,CAAA;gBAClB,CAAC,EAAE,CAAA;gBACH,MAAK;YACN,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA;AACpD,CAAC,CAAA;AA9CY,QAAA,OAAO,WA8CnB","sourcesContent":["import ckmeans from './ckmeans'\n\nexport const cluster = (data: number[], maxDistanceInCluster: number, minDistanceBetweenClusters: number, slots?: number) => {\n\tif (!data.length) {\n\t\treturn { centroids: [], clusters: [] }\n\t}\n\n\tlet k = slots ?? Math.max(Math.round(data.length / 5), 1) //Initialise k to a number of clusters equals to 1/5 of the number of data points\n\n\tconst history = []\n\tlet isNotStable = true\n\tlet centroids: number[] = []\n\tlet clusters: number[][] = []\n\twhile (isNotStable) {\n\t\thistory.push(k)\n\t\tisNotStable = false\n\t\tclusters = ckmeans(data, k)\n\t\tif (clusters.find((c) => !c.length)) {\n\t\t\tisNotStable = true\n\t\t\tk--\n\t\t\tcontinue\n\t\t}\n\t\tcentroids = clusters.map((a) => a.reduce((v, s) => s + v, 0) / a.length)\n\t\tconst positions = centroids.sort((a, b) => a - b)\n\n\t\tfor (let i = 0; i < positions.length - 1; i++) {\n\t\t\tconst dist = Math.abs(positions[i] - positions[i + 1])\n\t\t\tif (dist < minDistanceBetweenClusters) {\n\t\t\t\tif (!history.includes(k - 1)) {\n\t\t\t\t\tisNotStable = true\n\t\t\t\t\tk--\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif (isNotStable) {\n\t\t\tcontinue\n\t\t}\n\t\tfor (let i = 0; i < clusters.length; i++) {\n\t\t\tconst maxDistance = clusters[i].reduce((s, v) => Math.max(s, Math.abs(v - centroids[i])), 0)\n\t\t\tif (maxDistance > maxDistanceInCluster) {\n\t\t\t\tisNotStable = true\n\t\t\t\tk++\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\treturn { centroids: centroids, clusters: clusters }\n}\n"]}
|
package/conversion/ckmeans.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
/**
|
|
2
4
|
* For a sorted input, counting the number of unique values
|
|
3
5
|
* is possible in constant time and constant memory. This is
|
|
@@ -281,5 +283,5 @@ const ckmeans = (x, nClusters) => {
|
|
|
281
283
|
}
|
|
282
284
|
return clusters;
|
|
283
285
|
};
|
|
284
|
-
|
|
286
|
+
exports.default = ckmeans;
|
|
285
287
|
//# sourceMappingURL=ckmeans.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ckmeans.js","sourceRoot":"","sources":["../../tmp/conversion/ckmeans.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,SAAS,iBAAiB,CAAC,CAAQ;IAClC,IAAI,gBAAgB,GAAG,CAAC,EACvB,aAAa,GAAG,SAAS,CAAA;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,EAAE,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A;AAChB,CAAC,CAAA;AAED,eAAe,OAAO,CAAA","sourcesContent":["/**\n * For a sorted input, counting the number of unique values\n * is possible in constant time and constant memory. This is\n * a simple implementation of the algorithm.\n *\n * Values are compared with `===`, so objects and non-primitive objects\n * are not handled in any special way.\n *\n * @param {Array<*>} x an array of any kind of value\n * @returns {number} count of unique values\n * @example\n * uniqueCountSorted([1, 2, 3]); // => 3\n * uniqueCountSorted([1, 1, 1]); // => 1\n */\nfunction uniqueCountSorted(x: any[]) {\n\tlet uniqueValueCount = 0,\n\t\tlastSeenValue = undefined\n\tfor (let i = 0; i < x.length; i++) {\n\t\tif (i === 0 || x[i] !== lastSeenValue) {\n\t\t\tlastSeenValue = x[i]\n\t\t\tuniqueValueCount++\n\t\t}\n\t}\n\treturn uniqueValueCount\n}\n\n/**\n * Sort an array of numbers by their numeric value, ensuring that the\n * array is not changed in place.\n *\n * This is necessary because the default behavior of .sort\n * in JavaScript is to sort arrays as string values\n *\n * [1, 10, 12, 102, 20].sort()\n * // output\n * [1, 10, 102, 12, 20]\n *\n * @param {Array<number>} x input array\n * @return {Array<number>} sorted array\n * @private\n * @example\n * numericSort([3, 2, 1]) // => [1, 2, 3]\n */\nfunction numericSort(x: number[]): number[] {\n\treturn (\n\t\tx\n\t\t\t// ensure the array is not changed in-place\n\t\t\t.slice()\n\t\t\t// comparator function that treats input as numeric\n\t\t\t.sort(function (a, b) {\n\t\t\t\treturn a - b\n\t\t\t})\n\t)\n}\n\n/**\n * Create a new column x row matrix.\n *\n * @private\n * @param {number} span\n * @param {number} rows\n * @return {Array<Array<number>>} matrix\n * @example\n * makeMatrix(10, 10);\n */\nfunction makeMatrix(span: number, rows: number) {\n\tconst matrix = []\n\tfor (let i = 0; i < span; i++) {\n\t\tconst column = []\n\t\tfor (let j = 0; j < rows; j++) {\n\t\t\tcolumn.push(0)\n\t\t}\n\t\tmatrix.push(column)\n\t}\n\treturn matrix\n}\n\n/**\n * Generates incrementally computed values based on the sums and sums of\n * squares for the data array\n *\n * @private\n * @param {number} j\n * @param {number} i\n * @param {Array<number>} sums\n * @param {Array<number>} sumsOfSquares\n * @return {number}\n * @example\n * ssq(0, 1, [-1, 0, 2], [1, 1, 5]);\n */\nfunction ssq(j: number, i: number, sums: number[], sumsOfSquares: number[]) {\n\tlet sji // s(j, i)\n\tif (j > 0) {\n\t\tconst muji = (sums[i] - sums[j - 1]) / (i - j + 1) // mu(j, i)\n\t\tsji = sumsOfSquares[i] - sumsOfSquares[j - 1] - (i - j + 1) * muji * muji\n\t} else {\n\t\tsji = sumsOfSquares[i] - (sums[i] * sums[i]) / (i + 1)\n\t}\n\tif (sji < 0) {\n\t\treturn 0\n\t}\n\treturn sji\n}\n\n/**\n * Function that recursively divides and conquers computations\n * for cluster j\n *\n * @private\n * @param {number} iMin Minimum index in cluster to be computed\n * @param {number} iMax Maximum index in cluster to be computed\n * @param {number} cluster Index of the cluster currently being computed\n * @param {Array<Array<number>>} matrix\n * @param {Array<Array<number>>} backtrackMatrix\n * @param {Array<number>} sums\n * @param {Array<number>} sumsOfSquares\n */\nfunction fillMatrixColumn(iMin: number, iMax: number, cluster: number, matrix: number[][], backtrackMatrix: number[][], sums: number[], sumsOfSquares: number[]) {\n\tif (iMin > iMax) {\n\t\treturn\n\t}\n\n\t// Start at midpoint between iMin and iMax\n\tconst i = Math.floor((iMin + iMax) / 2)\n\n\tmatrix[cluster][i] = matrix[cluster - 1][i - 1]\n\tbacktrackMatrix[cluster][i] = i\n\n\tlet jlow = cluster // the lower end for j\n\n\tif (iMin > cluster) {\n\t\tjlow = Math.max(jlow, backtrackMatrix[cluster][iMin - 1] || 0)\n\t}\n\tjlow = Math.max(jlow, backtrackMatrix[cluster - 1][i] || 0)\n\n\tlet jhigh = i - 1 // the upper end for j\n\tif (iMax < matrix[0].length - 1) {\n\t\tjhigh = Math.min(jhigh, backtrackMatrix[cluster][iMax + 1] || 0)\n\t}\n\n\tlet sji\n\tlet sjlowi\n\tlet ssqjlow\n\tlet ssqj\n\tfor (let j = jhigh; j >= jlow; --j) {\n\t\tsji = ssq(j, i, sums, sumsOfSquares)\n\n\t\tif (sji + matrix[cluster - 1][jlow - 1] >= matrix[cluster][i]) {\n\t\t\tbreak\n\t\t}\n\n\t\t// Examine the lower bound of the cluster border\n\t\tsjlowi = ssq(jlow, i, sums, sumsOfSquares)\n\n\t\tssqjlow = sjlowi + matrix[cluster - 1][jlow - 1]\n\n\t\tif (ssqjlow < matrix[cluster][i]) {\n\t\t\t// Shrink the lower bound\n\t\t\tmatrix[cluster][i] = ssqjlow\n\t\t\tbacktrackMatrix[cluster][i] = jlow\n\t\t}\n\t\tjlow++\n\n\t\tssqj = sji + matrix[cluster - 1][j - 1]\n\t\tif (ssqj < matrix[cluster][i]) {\n\t\t\tmatrix[cluster][i] = ssqj\n\t\t\tbacktrackMatrix[cluster][i] = j\n\t\t}\n\t}\n\n\tfillMatrixColumn(iMin, i - 1, cluster, matrix, backtrackMatrix, sums, sumsOfSquares)\n\tfillMatrixColumn(i + 1, iMax, cluster, matrix, backtrackMatrix, sums, sumsOfSquares)\n}\n\n/**\n * Initializes the main matrices used in Ckmeans and kicks\n * off the divide and conquer cluster computation strategy\n *\n * @private\n * @param {Array<number>} data sorted array of values\n * @param {Array<Array<number>>} matrix\n * @param {Array<Array<number>>} backtrackMatrix\n */\nfunction fillMatrices(data: number[], matrix: number[][], backtrackMatrix: number[][]) {\n\tconst nValues = matrix[0].length\n\n\t// Shift values by the median to improve numeric stability\n\tconst shift = data[Math.floor(nValues / 2)]\n\n\t// Cumulative sum and cumulative sum of squares for all values in data array\n\tconst sums = [] as number[]\n\tconst sumsOfSquares = [] as number[]\n\n\t// Initialize first column in matrix & backtrackMatrix\n\tfor (let i = 0, shiftedValue; i < nValues; ++i) {\n\t\tshiftedValue = data[i] - shift\n\t\tif (i === 0) {\n\t\t\tsums.push(shiftedValue)\n\t\t\tsumsOfSquares.push(shiftedValue * shiftedValue)\n\t\t} else {\n\t\t\tsums.push(sums[i - 1] + shiftedValue)\n\t\t\tsumsOfSquares.push(sumsOfSquares[i - 1] + shiftedValue * shiftedValue)\n\t\t}\n\n\t\t// Initialize for cluster = 0\n\t\tmatrix[0][i] = ssq(0, i, sums, sumsOfSquares)\n\t\tbacktrackMatrix[0][i] = 0\n\t}\n\n\t// Initialize the rest of the span\n\tlet iMin\n\tfor (let cluster = 1; cluster < matrix.length; ++cluster) {\n\t\tif (cluster < matrix.length - 1) {\n\t\t\tiMin = cluster\n\t\t} else {\n\t\t\t// No need to compute matrix[K-1][0] ... matrix[K-1][N-2]\n\t\t\tiMin = nValues - 1\n\t\t}\n\n\t\tfillMatrixColumn(iMin, nValues - 1, cluster, matrix, backtrackMatrix, sums, sumsOfSquares)\n\t}\n}\n\n/**\n * Ckmeans clustering is an improvement on heuristic-based clustering\n * approaches like Jenks. The algorithm was developed in\n * [Haizhou Wang and Mingzhou Song](http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Wang+Song.pdf)\n * as a [dynamic programming](https://en.wikipedia.org/wiki/Dynamic_programming) approach\n * to the problem of clustering numeric data into groups with the least\n * within-group sum-of-squared-deviations.\n *\n * Minimizing the difference within groups - what Wang & Song refer to as\n * `withinss`, or within sum-of-squares, means that groups are optimally\n * homogenous within and the data is split into representative groups.\n * This is very useful for visualization, where you may want to represent\n * a continuous variable in discrete color or style groups. This function\n * can provide groups that emphasize differences between data.\n *\n * Being a dynamic approach, this algorithm is based on two matrices that\n * store incrementally-computed values for squared deviations and backtracking\n * indexes.\n *\n * This implementation is based on Ckmeans 3.4.6, which introduced a new divide\n * and conquer approach that improved runtime from O(kn^2) to O(kn log(n)).\n *\n * Unlike the [original implementation](https://cran.r-project.org/web/packages/Ckmeans.1d.dp/index.html),\n * this implementation does not include any code to automatically determine\n * the optimal number of clusters: this information needs to be explicitly\n * provided.\n *\n * ### References\n * _Ckmeans.1d.dp: Optimal k-means Clustering in One Dimension by Dynamic\n * Programming_ Haizhou Wang and Mingzhou Song ISSN 2073-4859\n *\n * from The R Journal Vol. 3/2, December 2011\n * @param {Array<number>} x input data, as an array of number values\n * @param {number} nClusters number of desired classes. This cannot be\n * greater than the number of values in the data array.\n * @returns {Array<Array<number>>} clustered input\n * @throws {Error} if the number of requested clusters is higher than the size of the data\n * @example\n * ckmeans([-1, 2, -1, 2, 4, 5, 6, -1, 2, -1], 3);\n * // The input, clustered into groups of similar numbers.\n * //= [[-1, -1, -1, -1], [2, 2, 2], [4, 5, 6]]);\n */\nconst ckmeans = (x: number[], nClusters: number): number[][] => {\n\tif (nClusters > x.length) {\n\t\tthrow new Error('cannot generate more classes than there are data values')\n\t}\n\n\tconst sorted = numericSort(x)\n\t// we'll use this as the maximum number of clusters\n\tconst uniqueCount = uniqueCountSorted(sorted)\n\n\t// if all of the input values are identical, there's one cluster\n\t// with all of the input in it.\n\tif (uniqueCount === 1) {\n\t\treturn [sorted]\n\t}\n\n\t// named 'S' originally\n\tconst matrix = makeMatrix(nClusters, sorted.length)\n\t// named 'J' originally\n\tconst backtrackMatrix = makeMatrix(nClusters, sorted.length)\n\n\t// This is a dynamic programming way to solve the problem of minimizing\n\t// within-cluster sum of squares. It's similar to linear regression\n\t// in this way, and this calculation incrementally computes the\n\t// sum of squares that are later read.\n\tfillMatrices(sorted, matrix, backtrackMatrix)\n\n\t// The real work of Ckmeans clustering happens in the matrix generation:\n\t// the generated matrices encode all possible clustering combinations, and\n\t// once they're generated we can solve for the best clustering groups\n\t// very quickly.\n\tconst clusters = []\n\tlet clusterRight = backtrackMatrix[0].length - 1\n\n\t// Backtrack the clusters from the dynamic programming matrix. This\n\t// starts at the bottom-right corner of the matrix (if the top-left is 0, 0),\n\t// and moves the cluster target with the loop.\n\tfor (let cluster = backtrackMatrix.length - 1; cluster >= 0; cluster--) {\n\t\tconst clusterLeft = backtrackMatrix[cluster][clusterRight]\n\n\t\t// fill the cluster from the sorted input by taking a slice of the\n\t\t// array. the backtrack matrix makes this easy - it stores the\n\t\t// indexes where the cluster should start and end.\n\t\tclusters[cluster] = sorted.slice(clusterLeft, clusterRight + 1)\n\n\t\tif (cluster > 0) {\n\t\t\tclusterRight = clusterLeft - 1\n\t\t}\n\t}\n\n\treturn clusters\n}\n\nexport default ckmeans\n"]}
|
|
1
|
+
{"version":3,"file":"ckmeans.js","sourceRoot":"","sources":["../../tmp/conversion/ckmeans.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;GAaG;AACH,SAAS,iBAAiB,CAAC,CAAQ;IAClC,IAAI,gBAAgB,GAAG,CAAC,EACvB,aAAa,GAAG,SAAS,CAAA;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,EAAE,CAAC;YACvC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;YACpB,gBAAgB,EAAE,CAAA;QACnB,CAAC;IACF,CAAC;IACD,OAAO,gBAAgB,CAAA;AACxB,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,WAAW,CAAC,CAAW;IAC/B,OAAO,CACN,CAAC;QACA,2CAA2C;SAC1C,KAAK,EAAE;QACR,mDAAmD;SAClD,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,CAAA;IACb,CAAC,CAAC,CACH,CAAA;AACF,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,UAAU,CAAC,IAAY,EAAE,IAAY;IAC7C,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,MAAM,MAAM,GAAG,EAAE,CAAA;QACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/B,MAAM,C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A;IAEhD,mEAAmE;IACnE,6EAA6E;IAC7E,8CAA8C;IAC9C,KAAK,IAAI,OAAO,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,OAAO,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;QACxE,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAA;QAE1D,kEAAkE;QAClE,8DAA8D;QAC9D,kDAAkD;QAClD,QAAQ,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,YAAY,GAAG,CAAC,CAAC,CAAA;QAE/D,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YACjB,YAAY,GAAG,WAAW,GAAG,CAAC,CAAA;QAC/B,CAAC;IACF,CAAC;IAED,OAAO,QAAQ,CAAA;AAChB,CAAC,CAAA;AAED,kBAAe,OAAO,CAAA","sourcesContent":["/**\n * For a sorted input, counting the number of unique values\n * is possible in constant time and constant memory. This is\n * a simple implementation of the algorithm.\n *\n * Values are compared with `===`, so objects and non-primitive objects\n * are not handled in any special way.\n *\n * @param {Array<*>} x an array of any kind of value\n * @returns {number} count of unique values\n * @example\n * uniqueCountSorted([1, 2, 3]); // => 3\n * uniqueCountSorted([1, 1, 1]); // => 1\n */\nfunction uniqueCountSorted(x: any[]) {\n\tlet uniqueValueCount = 0,\n\t\tlastSeenValue = undefined\n\tfor (let i = 0; i < x.length; i++) {\n\t\tif (i === 0 || x[i] !== lastSeenValue) {\n\t\t\tlastSeenValue = x[i]\n\t\t\tuniqueValueCount++\n\t\t}\n\t}\n\treturn uniqueValueCount\n}\n\n/**\n * Sort an array of numbers by their numeric value, ensuring that the\n * array is not changed in place.\n *\n * This is necessary because the default behavior of .sort\n * in JavaScript is to sort arrays as string values\n *\n * [1, 10, 12, 102, 20].sort()\n * // output\n * [1, 10, 102, 12, 20]\n *\n * @param {Array<number>} x input array\n * @return {Array<number>} sorted array\n * @private\n * @example\n * numericSort([3, 2, 1]) // => [1, 2, 3]\n */\nfunction numericSort(x: number[]): number[] {\n\treturn (\n\t\tx\n\t\t\t// ensure the array is not changed in-place\n\t\t\t.slice()\n\t\t\t// comparator function that treats input as numeric\n\t\t\t.sort(function (a, b) {\n\t\t\t\treturn a - b\n\t\t\t})\n\t)\n}\n\n/**\n * Create a new column x row matrix.\n *\n * @private\n * @param {number} span\n * @param {number} rows\n * @return {Array<Array<number>>} matrix\n * @example\n * makeMatrix(10, 10);\n */\nfunction makeMatrix(span: number, rows: number) {\n\tconst matrix = []\n\tfor (let i = 0; i < span; i++) {\n\t\tconst column = []\n\t\tfor (let j = 0; j < rows; j++) {\n\t\t\tcolumn.push(0)\n\t\t}\n\t\tmatrix.push(column)\n\t}\n\treturn matrix\n}\n\n/**\n * Generates incrementally computed values based on the sums and sums of\n * squares for the data array\n *\n * @private\n * @param {number} j\n * @param {number} i\n * @param {Array<number>} sums\n * @param {Array<number>} sumsOfSquares\n * @return {number}\n * @example\n * ssq(0, 1, [-1, 0, 2], [1, 1, 5]);\n */\nfunction ssq(j: number, i: number, sums: number[], sumsOfSquares: number[]) {\n\tlet sji // s(j, i)\n\tif (j > 0) {\n\t\tconst muji = (sums[i] - sums[j - 1]) / (i - j + 1) // mu(j, i)\n\t\tsji = sumsOfSquares[i] - sumsOfSquares[j - 1] - (i - j + 1) * muji * muji\n\t} else {\n\t\tsji = sumsOfSquares[i] - (sums[i] * sums[i]) / (i + 1)\n\t}\n\tif (sji < 0) {\n\t\treturn 0\n\t}\n\treturn sji\n}\n\n/**\n * Function that recursively divides and conquers computations\n * for cluster j\n *\n * @private\n * @param {number} iMin Minimum index in cluster to be computed\n * @param {number} iMax Maximum index in cluster to be computed\n * @param {number} cluster Index of the cluster currently being computed\n * @param {Array<Array<number>>} matrix\n * @param {Array<Array<number>>} backtrackMatrix\n * @param {Array<number>} sums\n * @param {Array<number>} sumsOfSquares\n */\nfunction fillMatrixColumn(iMin: number, iMax: number, cluster: number, matrix: number[][], backtrackMatrix: number[][], sums: number[], sumsOfSquares: number[]) {\n\tif (iMin > iMax) {\n\t\treturn\n\t}\n\n\t// Start at midpoint between iMin and iMax\n\tconst i = Math.floor((iMin + iMax) / 2)\n\n\tmatrix[cluster][i] = matrix[cluster - 1][i - 1]\n\tbacktrackMatrix[cluster][i] = i\n\n\tlet jlow = cluster // the lower end for j\n\n\tif (iMin > cluster) {\n\t\tjlow = Math.max(jlow, backtrackMatrix[cluster][iMin - 1] || 0)\n\t}\n\tjlow = Math.max(jlow, backtrackMatrix[cluster - 1][i] || 0)\n\n\tlet jhigh = i - 1 // the upper end for j\n\tif (iMax < matrix[0].length - 1) {\n\t\tjhigh = Math.min(jhigh, backtrackMatrix[cluster][iMax + 1] || 0)\n\t}\n\n\tlet sji\n\tlet sjlowi\n\tlet ssqjlow\n\tlet ssqj\n\tfor (let j = jhigh; j >= jlow; --j) {\n\t\tsji = ssq(j, i, sums, sumsOfSquares)\n\n\t\tif (sji + matrix[cluster - 1][jlow - 1] >= matrix[cluster][i]) {\n\t\t\tbreak\n\t\t}\n\n\t\t// Examine the lower bound of the cluster border\n\t\tsjlowi = ssq(jlow, i, sums, sumsOfSquares)\n\n\t\tssqjlow = sjlowi + matrix[cluster - 1][jlow - 1]\n\n\t\tif (ssqjlow < matrix[cluster][i]) {\n\t\t\t// Shrink the lower bound\n\t\t\tmatrix[cluster][i] = ssqjlow\n\t\t\tbacktrackMatrix[cluster][i] = jlow\n\t\t}\n\t\tjlow++\n\n\t\tssqj = sji + matrix[cluster - 1][j - 1]\n\t\tif (ssqj < matrix[cluster][i]) {\n\t\t\tmatrix[cluster][i] = ssqj\n\t\t\tbacktrackMatrix[cluster][i] = j\n\t\t}\n\t}\n\n\tfillMatrixColumn(iMin, i - 1, cluster, matrix, backtrackMatrix, sums, sumsOfSquares)\n\tfillMatrixColumn(i + 1, iMax, cluster, matrix, backtrackMatrix, sums, sumsOfSquares)\n}\n\n/**\n * Initializes the main matrices used in Ckmeans and kicks\n * off the divide and conquer cluster computation strategy\n *\n * @private\n * @param {Array<number>} data sorted array of values\n * @param {Array<Array<number>>} matrix\n * @param {Array<Array<number>>} backtrackMatrix\n */\nfunction fillMatrices(data: number[], matrix: number[][], backtrackMatrix: number[][]) {\n\tconst nValues = matrix[0].length\n\n\t// Shift values by the median to improve numeric stability\n\tconst shift = data[Math.floor(nValues / 2)]\n\n\t// Cumulative sum and cumulative sum of squares for all values in data array\n\tconst sums = [] as number[]\n\tconst sumsOfSquares = [] as number[]\n\n\t// Initialize first column in matrix & backtrackMatrix\n\tfor (let i = 0, shiftedValue; i < nValues; ++i) {\n\t\tshiftedValue = data[i] - shift\n\t\tif (i === 0) {\n\t\t\tsums.push(shiftedValue)\n\t\t\tsumsOfSquares.push(shiftedValue * shiftedValue)\n\t\t} else {\n\t\t\tsums.push(sums[i - 1] + shiftedValue)\n\t\t\tsumsOfSquares.push(sumsOfSquares[i - 1] + shiftedValue * shiftedValue)\n\t\t}\n\n\t\t// Initialize for cluster = 0\n\t\tmatrix[0][i] = ssq(0, i, sums, sumsOfSquares)\n\t\tbacktrackMatrix[0][i] = 0\n\t}\n\n\t// Initialize the rest of the span\n\tlet iMin\n\tfor (let cluster = 1; cluster < matrix.length; ++cluster) {\n\t\tif (cluster < matrix.length - 1) {\n\t\t\tiMin = cluster\n\t\t} else {\n\t\t\t// No need to compute matrix[K-1][0] ... matrix[K-1][N-2]\n\t\t\tiMin = nValues - 1\n\t\t}\n\n\t\tfillMatrixColumn(iMin, nValues - 1, cluster, matrix, backtrackMatrix, sums, sumsOfSquares)\n\t}\n}\n\n/**\n * Ckmeans clustering is an improvement on heuristic-based clustering\n * approaches like Jenks. The algorithm was developed in\n * [Haizhou Wang and Mingzhou Song](http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Wang+Song.pdf)\n * as a [dynamic programming](https://en.wikipedia.org/wiki/Dynamic_programming) approach\n * to the problem of clustering numeric data into groups with the least\n * within-group sum-of-squared-deviations.\n *\n * Minimizing the difference within groups - what Wang & Song refer to as\n * `withinss`, or within sum-of-squares, means that groups are optimally\n * homogenous within and the data is split into representative groups.\n * This is very useful for visualization, where you may want to represent\n * a continuous variable in discrete color or style groups. This function\n * can provide groups that emphasize differences between data.\n *\n * Being a dynamic approach, this algorithm is based on two matrices that\n * store incrementally-computed values for squared deviations and backtracking\n * indexes.\n *\n * This implementation is based on Ckmeans 3.4.6, which introduced a new divide\n * and conquer approach that improved runtime from O(kn^2) to O(kn log(n)).\n *\n * Unlike the [original implementation](https://cran.r-project.org/web/packages/Ckmeans.1d.dp/index.html),\n * this implementation does not include any code to automatically determine\n * the optimal number of clusters: this information needs to be explicitly\n * provided.\n *\n * ### References\n * _Ckmeans.1d.dp: Optimal k-means Clustering in One Dimension by Dynamic\n * Programming_ Haizhou Wang and Mingzhou Song ISSN 2073-4859\n *\n * from The R Journal Vol. 3/2, December 2011\n * @param {Array<number>} x input data, as an array of number values\n * @param {number} nClusters number of desired classes. This cannot be\n * greater than the number of values in the data array.\n * @returns {Array<Array<number>>} clustered input\n * @throws {Error} if the number of requested clusters is higher than the size of the data\n * @example\n * ckmeans([-1, 2, -1, 2, 4, 5, 6, -1, 2, -1], 3);\n * // The input, clustered into groups of similar numbers.\n * //= [[-1, -1, -1, -1], [2, 2, 2], [4, 5, 6]]);\n */\nconst ckmeans = (x: number[], nClusters: number): number[][] => {\n\tif (nClusters > x.length) {\n\t\tthrow new Error('cannot generate more classes than there are data values')\n\t}\n\n\tconst sorted = numericSort(x)\n\t// we'll use this as the maximum number of clusters\n\tconst uniqueCount = uniqueCountSorted(sorted)\n\n\t// if all of the input values are identical, there's one cluster\n\t// with all of the input in it.\n\tif (uniqueCount === 1) {\n\t\treturn [sorted]\n\t}\n\n\t// named 'S' originally\n\tconst matrix = makeMatrix(nClusters, sorted.length)\n\t// named 'J' originally\n\tconst backtrackMatrix = makeMatrix(nClusters, sorted.length)\n\n\t// This is a dynamic programming way to solve the problem of minimizing\n\t// within-cluster sum of squares. It's similar to linear regression\n\t// in this way, and this calculation incrementally computes the\n\t// sum of squares that are later read.\n\tfillMatrices(sorted, matrix, backtrackMatrix)\n\n\t// The real work of Ckmeans clustering happens in the matrix generation:\n\t// the generated matrices encode all possible clustering combinations, and\n\t// once they're generated we can solve for the best clustering groups\n\t// very quickly.\n\tconst clusters = []\n\tlet clusterRight = backtrackMatrix[0].length - 1\n\n\t// Backtrack the clusters from the dynamic programming matrix. This\n\t// starts at the bottom-right corner of the matrix (if the top-left is 0, 0),\n\t// and moves the cluster target with the loop.\n\tfor (let cluster = backtrackMatrix.length - 1; cluster >= 0; cluster--) {\n\t\tconst clusterLeft = backtrackMatrix[cluster][clusterRight]\n\n\t\t// fill the cluster from the sorted input by taking a slice of the\n\t\t// array. the backtrack matrix makes this easy - it stores the\n\t\t// indexes where the cluster should start and end.\n\t\tclusters[cluster] = sorted.slice(clusterLeft, clusterRight + 1)\n\n\t\tif (cluster > 0) {\n\t\t\tclusterRight = clusterLeft - 1\n\t\t}\n\t}\n\n\treturn clusters\n}\n\nexport default ckmeans\n"]}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertLegacy = convertLegacy;
|
|
4
|
+
const model_1 = require("../components/model");
|
|
5
|
+
const ckmeans_grouping_1 = require("./ckmeans-grouping");
|
|
6
|
+
function convertLegacy(form, formsLibrary) {
|
|
4
7
|
var _a, _b;
|
|
5
8
|
const TOTAL_COLUMNS = 24;
|
|
6
|
-
const makeTextField = (formData, width, height) => { var _a; return new TextField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
7
|
-
const makeItemsListField = (formData, width, height) => { var _a; return new ItemsListField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
8
|
-
const makeTokenField = (formData, width, height) => { var _a; return new TokenField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
9
|
-
const makeCheckBox = (formData, width, height) => { var _a, _b; return new CheckBox((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, options: { [(_b = formData.label) !== null && _b !== void 0 ? _b : '']: formData.label }, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
10
|
-
const makeMeasureField = (formData, width, height) => { var _a; return new MeasureField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
11
|
-
const makeNumberField = (formData, width, height) => { var _a; return new NumberField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
9
|
+
const makeTextField = (formData, width, height) => { var _a; return new model_1.TextField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
10
|
+
const makeItemsListField = (formData, width, height) => { var _a; return new model_1.ItemsListField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
11
|
+
const makeTokenField = (formData, width, height) => { var _a; return new model_1.TokenField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
12
|
+
const makeCheckBox = (formData, width, height) => { var _a, _b; return new model_1.CheckBox((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, options: { [(_b = formData.label) !== null && _b !== void 0 ? _b : '']: formData.label }, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
13
|
+
const makeMeasureField = (formData, width, height) => { var _a; return new model_1.MeasureField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
14
|
+
const makeNumberField = (formData, width, height) => { var _a; return new model_1.NumberField((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
12
15
|
const makeDateTimeField = (formData, width, height) => {
|
|
13
16
|
var _a, _b, _c;
|
|
14
17
|
return ((_a = formData.editor) === null || _a === void 0 ? void 0 : _a.displayTime)
|
|
15
|
-
? new DateTimePicker((_b = formData.name) !== null && _b !== void 0 ? _b : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined })
|
|
16
|
-
: new DatePicker((_c = formData.name) !== null && _c !== void 0 ? _c : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined });
|
|
18
|
+
? new model_1.DateTimePicker((_b = formData.name) !== null && _b !== void 0 ? _b : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined })
|
|
19
|
+
: new model_1.DatePicker((_c = formData.name) !== null && _c !== void 0 ? _c : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined });
|
|
17
20
|
};
|
|
18
21
|
const makeDropdownField = (formData, width, height) => {
|
|
19
22
|
var _a, _b, _c;
|
|
20
|
-
return new DropdownField((_a = formData.name) !== null && _a !== void 0 ? _a : '', {
|
|
23
|
+
return new model_1.DropdownField((_a = formData.name) !== null && _a !== void 0 ? _a : '', {
|
|
21
24
|
shortLabel: formData.label,
|
|
22
25
|
span: width,
|
|
23
26
|
options: ((_b = formData.editor) === null || _b === void 0 ? void 0 : _b.menuOptions)
|
|
@@ -34,19 +37,19 @@ export function convertLegacy(form, formsLibrary) {
|
|
|
34
37
|
}
|
|
35
38
|
return convertLegacy(subForm, formsLibrary);
|
|
36
39
|
});
|
|
37
|
-
return new Subform((_c = formData.name) !== null && _c !== void 0 ? _c : '', subForms.reduce((acc, sf) => (Object.assign(Object.assign({}, acc), { [sf.form]: sf })), {}), {
|
|
40
|
+
return new model_1.Subform((_c = formData.name) !== null && _c !== void 0 ? _c : '', subForms.reduce((acc, sf) => (Object.assign(Object.assign({}, acc), { [sf.form]: sf })), {}), {
|
|
38
41
|
shortLabel: formData.label,
|
|
39
42
|
span: width,
|
|
40
43
|
rowSpan: height,
|
|
41
44
|
});
|
|
42
45
|
};
|
|
43
|
-
const makeActionButton = (formData, width, height) => { var _a; return new Button((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
46
|
+
const makeActionButton = (formData, width, height) => { var _a; return new model_1.Button((_a = formData.name) !== null && _a !== void 0 ? _a : '', { shortLabel: formData.label, span: width, rowSpan: height > 1 ? height : undefined }); };
|
|
44
47
|
// noinspection UnnecessaryLocalVariableJS
|
|
45
|
-
const translated = new Form((_a = (form.group ? `${form.group}/${form.name}` : form.name)) !== null && _a !== void 0 ? _a : 'Unknown', ((_b = form.sections) !== null && _b !== void 0 ? _b : []).map((section) => {
|
|
48
|
+
const translated = new model_1.Form((_a = (form.group ? `${form.group}/${form.name}` : form.name)) !== null && _a !== void 0 ? _a : 'Unknown', ((_b = form.sections) !== null && _b !== void 0 ? _b : []).map((section) => {
|
|
46
49
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
47
50
|
const fld = ((_a = section.formColumns) !== null && _a !== void 0 ? _a : []).flatMap((column) => { var _a; return (_a = column.formDataList) !== null && _a !== void 0 ? _a : []; });
|
|
48
51
|
const sortedList = fld.sort((a, b) => { var _a, _b, _c, _d; return ((_b = (_a = a.editor) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = b.editor) === null || _c === void 0 ? void 0 : _c.top) !== null && _d !== void 0 ? _d : 0); });
|
|
49
|
-
const rowClusters = cluster(fld.map((f) => { var _a, _b; return (_b = (_a = f.editor) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0; }), 5, 16);
|
|
52
|
+
const rowClusters = (0, ckmeans_grouping_1.cluster)(fld.map((f) => { var _a, _b; return (_b = (_a = f.editor) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0; }), 5, 16);
|
|
50
53
|
const rows = rowClusters.clusters;
|
|
51
54
|
const intraCentroids = rowClusters.centroids.map((v, idx, centroids) => (idx > 0 ? v - centroids[idx - 1] : 0)).filter((x) => x > 0);
|
|
52
55
|
const meanHeightWithOutliers = intraCentroids.reduce((sum, v) => v + sum, 0) / intraCentroids.length;
|
|
@@ -65,7 +68,7 @@ export function convertLegacy(form, formsLibrary) {
|
|
|
65
68
|
const leftSide = (_c = (_b = leftMostField.editor) === null || _b === void 0 ? void 0 : _b.left) !== null && _c !== void 0 ? _c : 0;
|
|
66
69
|
const formWidth = ((_e = (_d = rightMostField === null || rightMostField === void 0 ? void 0 : rightMostField.editor) === null || _d === void 0 ? void 0 : _d.left) !== null && _e !== void 0 ? _e : 0) + ((_g = (_f = rightMostField === null || rightMostField === void 0 ? void 0 : rightMostField.editor) === null || _f === void 0 ? void 0 : _f.width) !== null && _g !== void 0 ? _g : 1024) - leftSide;
|
|
67
70
|
const interColumnsDistance = formWidth / TOTAL_COLUMNS;
|
|
68
|
-
const columns = cluster(fld.map((f) => { var _a, _b, _c, _d; return ((_b = (_a = f.editor) === null || _a === void 0 ? void 0 : _a.left) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = f.editor) === null || _c === void 0 ? void 0 : _c.width) !== null && _d !== void 0 ? _d : 0) - leftSide; }), formWidth / (TOTAL_COLUMNS * 2), Math.ceil((formWidth !== null && formWidth !== void 0 ? formWidth : 1024) / (TOTAL_COLUMNS * 4)), Math.max(Math.min(TOTAL_COLUMNS, fld.length / 2), 1));
|
|
71
|
+
const columns = (0, ckmeans_grouping_1.cluster)(fld.map((f) => { var _a, _b, _c, _d; return ((_b = (_a = f.editor) === null || _a === void 0 ? void 0 : _a.left) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = f.editor) === null || _c === void 0 ? void 0 : _c.width) !== null && _d !== void 0 ? _d : 0) - leftSide; }), formWidth / (TOTAL_COLUMNS * 2), Math.ceil((formWidth !== null && formWidth !== void 0 ? formWidth : 1024) / (TOTAL_COLUMNS * 4)), Math.max(Math.min(TOTAL_COLUMNS, fld.length / 2), 1));
|
|
69
72
|
const columnsWidth = columns.centroids.map((v, idx, t) => { var _a; return v - ((_a = t[idx - 1]) !== null && _a !== void 0 ? _a : 0); });
|
|
70
73
|
const acc = columnsWidth.map(() => 1);
|
|
71
74
|
while (acc.reduce((s, v) => s + v, 0) < TOTAL_COLUMNS) {
|
|
@@ -83,7 +86,7 @@ export function convertLegacy(form, formsLibrary) {
|
|
|
83
86
|
const columnsRoundedWidth = acc;
|
|
84
87
|
const columnsAccumulatedWidth = columnsRoundedWidth.reduce((acc, v) => { var _a; return [...acc, ((_a = acc[acc.length - 1]) !== null && _a !== void 0 ? _a : 0) + v]; }, []);
|
|
85
88
|
const columnsAccumulatedWidthWithInterColumns = columnsAccumulatedWidth.map((v) => v * interColumnsDistance);
|
|
86
|
-
return new Section('Main', formDataClusters.flatMap((formDataRow) => {
|
|
89
|
+
return new model_1.Section('Main', formDataClusters.flatMap((formDataRow) => {
|
|
87
90
|
const cols = formDataRow
|
|
88
91
|
.map((formData) => {
|
|
89
92
|
return columnsAccumulatedWidth[columnsAccumulatedWidthWithInterColumns.reduce(([idx, min], x, n) => {
|