@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,6 +1,7 @@
|
|
|
1
1
|
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
2
2
|
import { Field } from '../common';
|
|
3
|
-
|
|
3
|
+
import { FieldMetadata } from '../model';
|
|
4
|
+
declare const IcureDropdownField_base: (abstract new (...args: any[]) => import("../common/field-with-options").FieldWithOptionsMixinInterface) & typeof Field;
|
|
4
5
|
export declare class IcureDropdownField extends IcureDropdownField_base {
|
|
5
6
|
placeholder: string;
|
|
6
7
|
protected displayMenu: boolean;
|
|
@@ -14,6 +15,8 @@ export declare class IcureDropdownField extends IcureDropdownField_base {
|
|
|
14
15
|
private triggerSearch;
|
|
15
16
|
handleOptionButtonClicked(id: string | undefined): (e: Event) => boolean;
|
|
16
17
|
getValueFromProvider(): [string, string] | [undefined, undefined];
|
|
17
|
-
|
|
18
|
+
renderSync({ validationErrors }: {
|
|
19
|
+
validationErrors: [FieldMetadata, string][];
|
|
20
|
+
}): TemplateResult;
|
|
18
21
|
}
|
|
19
22
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -7,16 +8,37 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IcureDropdownField = void 0;
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
15
|
+
const paths_1 = require("../common/styles/paths");
|
|
16
|
+
const common_1 = require("../common");
|
|
17
|
+
const utils_1 = require("../common/utils");
|
|
18
|
+
const utils_2 = require("../icure-form/fields/utils");
|
|
19
|
+
const field_with_options_1 = require("../common/field-with-options");
|
|
17
20
|
// @ts-ignore
|
|
18
|
-
|
|
19
|
-
const baseCss = css `@charset "UTF-8";
|
|
21
|
+
const lit_2 = require("lit");
|
|
22
|
+
const baseCss = (0, lit_2.css) `@charset "UTF-8";
|
|
23
|
+
.tab-container .tab-bar li {
|
|
24
|
+
display: inline-block;
|
|
25
|
+
padding: 8px 16px;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
color: #000000;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
}
|
|
31
|
+
.tab-container .tab-bar li.active {
|
|
32
|
+
background-color: #656565;
|
|
33
|
+
color: white;
|
|
34
|
+
}
|
|
35
|
+
.tab-container .tab-content .tab {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
.tab-container .tab-content .tab.active {
|
|
39
|
+
display: block;
|
|
40
|
+
}
|
|
41
|
+
|
|
20
42
|
:host {
|
|
21
43
|
--bg-color-1: #f44336;
|
|
22
44
|
}
|
|
@@ -65,15 +87,15 @@ const baseCss = css `@charset "UTF-8";
|
|
|
65
87
|
margin-right: 0;
|
|
66
88
|
}
|
|
67
89
|
|
|
68
|
-
.ProseMirror-hideselection {
|
|
69
|
-
caret-color: transparent;
|
|
70
|
-
}
|
|
71
90
|
.ProseMirror-hideselection *::selection {
|
|
72
91
|
background: transparent;
|
|
73
92
|
}
|
|
74
93
|
.ProseMirror-hideselection *::-moz-selection {
|
|
75
94
|
background: transparent;
|
|
76
95
|
}
|
|
96
|
+
.ProseMirror-hideselection {
|
|
97
|
+
caret-color: transparent;
|
|
98
|
+
}
|
|
77
99
|
|
|
78
100
|
.ProseMirror-selectednode {
|
|
79
101
|
outline: 2px solid #8cf;
|
|
@@ -864,13 +886,13 @@ app-date-picker {
|
|
|
864
886
|
margin-bottom: 20px;
|
|
865
887
|
}
|
|
866
888
|
.icure-form h2 {
|
|
867
|
-
font-size:
|
|
889
|
+
font-size: add-two(12px, 0, 1.2);
|
|
868
890
|
font-weight: 700;
|
|
869
891
|
color: #084B83;
|
|
870
892
|
padding: 2px;
|
|
871
893
|
}
|
|
872
894
|
.icure-form h3 {
|
|
873
|
-
font-size:
|
|
895
|
+
font-size: add-two(12px, 0, 1.1);
|
|
874
896
|
font-weight: 500;
|
|
875
897
|
color: #084B83;
|
|
876
898
|
padding: 6px;
|
|
@@ -902,17 +924,16 @@ app-date-picker {
|
|
|
902
924
|
line-height: 1.4em;
|
|
903
925
|
cursor: text;
|
|
904
926
|
font-size: 12px;
|
|
905
|
-
left:
|
|
927
|
+
left: add-two(8px, 1px);
|
|
906
928
|
color: #084B83;
|
|
907
929
|
align-items: center;
|
|
908
|
-
|
|
930
|
+
text-wrap: auto;
|
|
931
|
+
min-height: 28px;
|
|
909
932
|
max-width: 85%;
|
|
910
933
|
min-width: 0;
|
|
911
934
|
}
|
|
912
935
|
.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {
|
|
913
936
|
display: flex;
|
|
914
|
-
white-space: nowrap;
|
|
915
|
-
text-overflow: ellipsis;
|
|
916
937
|
overflow: hidden;
|
|
917
938
|
}
|
|
918
939
|
|
|
@@ -947,7 +968,6 @@ app-date-picker {
|
|
|
947
968
|
border-style: solid;
|
|
948
969
|
border-color: #DDE3E7;
|
|
949
970
|
border-radius: 2px;
|
|
950
|
-
box-sizing: border-box;
|
|
951
971
|
outline: 0;
|
|
952
972
|
font: inherit;
|
|
953
973
|
font-size: 14px;
|
|
@@ -960,6 +980,25 @@ app-date-picker {
|
|
|
960
980
|
background-color: #ffffff;
|
|
961
981
|
color: #000000;
|
|
962
982
|
}
|
|
983
|
+
.icure-text-field .icure-input .reset-button,
|
|
984
|
+
.icure-text-field .input-container .reset-button {
|
|
985
|
+
position: absolute;
|
|
986
|
+
right: 0;
|
|
987
|
+
border: none;
|
|
988
|
+
background: transparent;
|
|
989
|
+
top: 0;
|
|
990
|
+
opacity: 0.5;
|
|
991
|
+
cursor: pointer;
|
|
992
|
+
height: 20px;
|
|
993
|
+
margin-left: 4px;
|
|
994
|
+
margin-right: 4px;
|
|
995
|
+
padding: 0;
|
|
996
|
+
}
|
|
997
|
+
.icure-text-field .icure-input .reset-button svg,
|
|
998
|
+
.icure-text-field .input-container .reset-button svg {
|
|
999
|
+
width: 15px;
|
|
1000
|
+
height: 15px;
|
|
1001
|
+
}
|
|
963
1002
|
.icure-text-field .icure-input__validationError,
|
|
964
1003
|
.icure-text-field .input-container__validationError {
|
|
965
1004
|
border-color: red;
|
|
@@ -1073,8 +1112,8 @@ input[type=radio] {
|
|
|
1073
1112
|
line-height: 1.4em;
|
|
1074
1113
|
cursor: text;
|
|
1075
1114
|
font-size: 12px;
|
|
1076
|
-
top:
|
|
1077
|
-
left:
|
|
1115
|
+
top: add-three(1.4em, 1px, 0);
|
|
1116
|
+
left: add-two(8px, 1px);
|
|
1078
1117
|
transition: transform 0.2s ease-out, color 0.2s ease-out;
|
|
1079
1118
|
color: #084B83;
|
|
1080
1119
|
display: flex;
|
|
@@ -1101,7 +1140,8 @@ input[type=radio] {
|
|
|
1101
1140
|
font-weight: 500;
|
|
1102
1141
|
height: 1.4em;
|
|
1103
1142
|
}`;
|
|
1104
|
-
|
|
1143
|
+
const index_1 = require("../../index");
|
|
1144
|
+
class IcureDropdownField extends (0, field_with_options_1.FieldWithOptionsMixin)(common_1.Field) {
|
|
1105
1145
|
constructor() {
|
|
1106
1146
|
super(...arguments);
|
|
1107
1147
|
this.placeholder = '';
|
|
@@ -1177,7 +1217,7 @@ export class IcureDropdownField extends FieldWithOptionsMixin(Field) {
|
|
|
1177
1217
|
}
|
|
1178
1218
|
getValueFromProvider() {
|
|
1179
1219
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1180
|
-
const [id, versions] = extractSingleValue((_a = this.valueProvider) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
1220
|
+
const [id, versions] = (0, utils_2.extractSingleValue)((_a = this.valueProvider) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
1181
1221
|
if (versions) {
|
|
1182
1222
|
const value = (_b = versions[0]) === null || _b === void 0 ? void 0 : _b.value;
|
|
1183
1223
|
const valueForLanguage = (_d = (_c = value === null || value === void 0 ? void 0 : value.content) === null || _c === void 0 ? void 0 : _c[this.language()]) !== null && _d !== void 0 ? _d : '';
|
|
@@ -1190,26 +1230,29 @@ export class IcureDropdownField extends FieldWithOptionsMixin(Field) {
|
|
|
1190
1230
|
}
|
|
1191
1231
|
return [undefined, undefined];
|
|
1192
1232
|
}
|
|
1193
|
-
|
|
1194
|
-
var _a, _b, _c, _d
|
|
1233
|
+
renderSync({ validationErrors }) {
|
|
1234
|
+
var _a, _b, _c, _d;
|
|
1195
1235
|
if (!this.visible) {
|
|
1196
|
-
return html ``;
|
|
1236
|
+
return (0, lit_1.html) ``;
|
|
1237
|
+
}
|
|
1238
|
+
if (index_1.icureFormLogging) {
|
|
1239
|
+
console.log(`Rendering dropdown ${this.label}`);
|
|
1197
1240
|
}
|
|
1198
1241
|
const [, inputValue] = (_a = this.getValueFromProvider()) !== null && _a !== void 0 ? _a : '';
|
|
1199
|
-
const validationError =
|
|
1200
|
-
return html `
|
|
1242
|
+
const validationError = validationErrors.length;
|
|
1243
|
+
return (0, lit_1.html) `
|
|
1201
1244
|
<div id="root" class="icure-text-field ${inputValue != '' ? 'has-content' : ''}" data-placeholder=${this.placeholder}>
|
|
1202
|
-
${this.displayedLabels ? generateLabels(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : nothing}
|
|
1245
|
+
${this.displayedLabels ? (0, utils_1.generateLabels)(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : lit_1.nothing}
|
|
1203
1246
|
<div class="icure-input ${validationError && 'icure-input__validationError'}" id="test" @click="${(event) => this.togglePopup(event, true)}">
|
|
1204
|
-
<input type="text" id="editor" style="outline: none" .value=${(
|
|
1247
|
+
<input type="text" id="editor" style="outline: none" .value=${(_c = (_b = this.textInputValue) !== null && _b !== void 0 ? _b : inputValue) !== null && _c !== void 0 ? _c : ''} @input="${this.textInputChanged()}" autocomplete="off" />
|
|
1205
1248
|
<div id="extra" class=${'extra forced'}>
|
|
1206
|
-
<button class="btn select-arrow" @click="${this.togglePopup}">${dropdownPicto}</button>
|
|
1249
|
+
<button class="btn select-arrow" @click="${this.togglePopup}">${paths_1.dropdownPicto}</button>
|
|
1207
1250
|
${this.displayMenu
|
|
1208
|
-
? html `
|
|
1251
|
+
? (0, lit_1.html) `
|
|
1209
1252
|
<div id="menu" class="options">
|
|
1210
|
-
${(
|
|
1253
|
+
${(_d = this.displayedOptions) === null || _d === void 0 ? void 0 : _d.map((x) => {
|
|
1211
1254
|
var _a, _b;
|
|
1212
|
-
return html `<button @click="${this.handleOptionButtonClicked(x.id)}" id="${x.id}" class="option ${((_a = x === null || x === void 0 ? void 0 : x['label']) === null || _a === void 0 ? void 0 : _a[this.language()]) === inputValue ? 'selected' : ''}">
|
|
1255
|
+
return (0, lit_1.html) `<button @click="${this.handleOptionButtonClicked(x.id)}" id="${x.id}" class="option ${((_a = x === null || x === void 0 ? void 0 : x['label']) === null || _a === void 0 ? void 0 : _a[this.language()]) === inputValue ? 'selected' : ''}">
|
|
1213
1256
|
${((_b = x === null || x === void 0 ? void 0 : x['label']) === null || _b === void 0 ? void 0 : _b[this.language()]) || ''}
|
|
1214
1257
|
</button>`;
|
|
1215
1258
|
})}
|
|
@@ -1218,21 +1261,22 @@ export class IcureDropdownField extends FieldWithOptionsMixin(Field) {
|
|
|
1218
1261
|
: ''}
|
|
1219
1262
|
</div>
|
|
1220
1263
|
</div>
|
|
1221
|
-
<div class="error">${
|
|
1264
|
+
<div class="error">${validationErrors.map(([, error]) => { var _a; return (0, lit_1.html) `<div>${(_a = this.translationProvider) === null || _a === void 0 ? void 0 : _a.call(this, this.language(), error)}</div>`; })}</div>
|
|
1222
1265
|
</div>
|
|
1223
1266
|
`;
|
|
1224
1267
|
}
|
|
1225
1268
|
}
|
|
1269
|
+
exports.IcureDropdownField = IcureDropdownField;
|
|
1226
1270
|
__decorate([
|
|
1227
|
-
property(),
|
|
1271
|
+
(0, decorators_js_1.property)(),
|
|
1228
1272
|
__metadata("design:type", Object)
|
|
1229
1273
|
], IcureDropdownField.prototype, "placeholder", void 0);
|
|
1230
1274
|
__decorate([
|
|
1231
|
-
state(),
|
|
1275
|
+
(0, decorators_js_1.state)(),
|
|
1232
1276
|
__metadata("design:type", Object)
|
|
1233
1277
|
], IcureDropdownField.prototype, "displayMenu", void 0);
|
|
1234
1278
|
__decorate([
|
|
1235
|
-
state(),
|
|
1279
|
+
(0, decorators_js_1.state)(),
|
|
1236
1280
|
__metadata("design:type", String)
|
|
1237
1281
|
], IcureDropdownField.prototype, "textInputValue", void 0);
|
|
1238
1282
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-dropdown-field/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACpE,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;eACxJ,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,OAAO,CAAC,0CAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAI,EAAE;sBAC9B,CAAA;aAAA,CACX;;UAED;YACH,CAAC,CAAC,EAAE;;;yBAGc,MAAA,IAAI,CAAC,wBAAwB,qDAAK,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,WAAC,OAAA,IAAI,CAAA,QAAQ,MAAA,IAAI,CAAC,mBAAmB,qDAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAA,EAAA,CAAC;;GAElJ,CAAA;IACF,CAAC;CACD;AAjIY;IAAX,QAAQ,EAAE;;uDAAiB;AAET;IAAlB,KAAK,EAAE;;uDAA8B;AACnB;IAAlB,KAAK,EAAE;;0DAA8C","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { dropdownPicto } from '../common/styles/paths'\nimport { Field } from '../common'\nimport { generateLabels } from '../common/utils'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { FieldWithOptionsMixin } from '../common/field-with-options'\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\n width: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n.ProseMirror p {\n margin-bottom: 1em;\n}\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n.ProseMirror li {\n position: relative;\n}\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\nli.ProseMirror-selectednode :after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor,\n.editor {\n color: rgb(101, 101, 101);\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n display: flex;\n align-items: flex-end;\n}\n\n.icure-input {\n background: #edf2f7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n#editor.tokens-list .ProseMirror, #editor.styled-tokens-list .ProseMirror {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n#editor.tokens-list .ProseMirror li, #editor.styled-tokens-list .ProseMirror li {\n display: flex;\n flex-direction: row;\n border-radius: 8px;\n padding: 2px 4px;\n margin-right: 2px;\n background-color: #dadada;\n border-color: rgba(42, 61, 108, 0.44);\n min-height: 20px;\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n display: inline-block;\n min-height: 18px;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.items-list .ProseMirror {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: 6px;\n}\n#editor.items-list .ProseMirror li {\n list-style-type: none;\n width: 100%;\n padding-bottom: 4px;\n border-bottom: 1px dotted rgba(128, 128, 128, 0.5098039216);\n}\n#editor.items-list .ProseMirror li:last-child {\n border-bottom: none;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.icure-input-metadata-container {\n display: flex;\n}\n.icure-input-metadata-container .icure-metadata-container {\n display: flex;\n flex-grow: 1;\n padding: 0 4px;\n border: 1px solid #DDE3E7;\n border-left: none;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-sizing: border-box;\n}\n.icure-input-metadata-container .icure-metadata-container__validationError {\n border-color: red;\n}\n\n.extra {\n min-width: 20px;\n width: auto;\n height: 20px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n.extra:hover .info {\n display: none;\n}\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n display: unset !important;\n}\n.extra.forced .info, .extra.forced .extra .info.hidden {\n opacity: 0 !important;\n z-index: 0 !important;\n display: none;\n}\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n.extra--metadataButtonsBar {\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 4px;\n}\n.extra .info {\n color: #809ab4;\n font-size: 15px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: center;\n}\n.extra .info span {\n font-weight: 700;\n}\n.extra .info.hidden {\n display: none;\n}\n.extra .buttons-container {\n display: flex;\n height: 20px;\n width: auto;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n z-index: 1000;\n}\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n display: none;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.extra .buttons-container .btn svg {\n width: 15px;\n height: 15px;\n}\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n.extra .buttons-container .btn.forced {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra .buttons-container .btn.forced svg path {\n fill: crimson !important;\n}\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -21px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n@keyframes slideIn {\n 0% {\n top: 0;\n opacity: 0;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n display: flex;\n align-items: center;\n height: fit-content;\n}\n.menu-container .item {\n height: 30px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\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.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n font-weight: 500;\n border-radius: 4px;\n}\n\n.value-date-menu {\n width: unset !important;\n}\n\n.menu {\n display: flex;\n flex-direction: column;\n gap: 2px;\n position: absolute;\n top: 32px;\n right: -12px;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n.menu .input-container {\n background: #edf2f7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);\n}\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: flex;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\nspan.date {\n margin-right: 1px;\n}\nspan.time {\n margin-left: 1px;\n}\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #ffffff;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: hsl(194, 100%, 50%);\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n.companion:hover {\n font-weight: 700;\n background: hsl(202, 100%, 50%);\n}\n\n*::selection {\n background-color: hsla(194, 100%, 50%, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: rgb(39, 71, 104);\n}\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: rgb(128, 154, 180);\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after,\nspan.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after,\nspan.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after,\nspan.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}\n\n.selected-option {\n padding: 2px;\n margin-right: 5px;\n}\n\n.options {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: auto;\n min-width: 100%;\n overflow-y: auto;\n padding: 2px;\n border-radius: 6px;\n}\n.options--subformView {\n top: 46px;\n min-width: unset;\n left: unset;\n right: 0;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: 260px;\n overflow-y: auto;\n max-height: 280px;\n}\n\napp-date-picker {\n --app-primary: #084B83;\n --app-hover: #5b7da2;\n --app-selected-hover: #5b7da2;\n}\n\n.option {\n height: 28px;\n min-height: 28px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #545454;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n padding: 4px 8px;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n cursor: pointer;\n}\n.option:hover {\n color: #656565;\n background-color: #ededed;\n}\n\n.select-arrow {\n border: none;\n background: 0px 0px;\n position: relative;\n top: 0px;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0px;\n}\n\n.hidden {\n display: none;\n}\n\n.container {\n position: relative;\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n display: grid;\n position: relative;\n padding: 8px;\n border-radius: 6px;\n background-color: #e7f0fd;\n gap: 12px;\n}\n.subform__heading {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: auto;\n}\n.subform__heading__title {\n padding: 0;\n margin: 0;\n}\n.subform__addBtn, .subform__removeBtn {\n cursor: pointer;\n background-color: #084B83;\n color: white;\n height: 32px;\n padding: 0 16px;\n border-radius: 6px;\n border: none;\n outline: none;\n}\n.subform__addBtn:hover, .subform__removeBtn:hover {\n background-color: #3D87C5;\n}\n.subform__removeBtn {\n justify-self: end;\n border: 1px solid #DDE3E7;\n background-color: #FCFCFD;\n color: #084B83;\n}\n.subform__removeBtn:hover {\n background-color: #F2F2F2;\n}\n.subform__child {\n display: grid;\n grid-template-rows: auto;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: white;\n border: 1px solid #3D87C5;\n}\n.subform__child__title {\n padding: 12px !important;\n border-radius: 6px;\n margin: 0;\n background-color: #BFE8EA;\n}\n.subform__child .subform {\n background: unset;\n margin: 0;\n padding: 0;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 16px 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n.icure-form hr {\n display: block;\n margin-top: 20px;\n border-top: 1px solid rgba(8, 75, 131, 0.13);\n margin-bottom: 20px;\n}\n.icure-form h2 {\n font-size: 14.4px;\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: 13.2px;\n font-weight: 500;\n color: #084B83;\n padding: 6px;\n}\n.icure-form .group.bordered {\n background: #f6f6f6;\n border-radius: 12px;\n}\n\n.icure-form-field {\n display: grid;\n align-items: flex-start;\n}\n\n.error {\n color: red;\n font-size: 12px;\n margin-top: 4px;\n}\n\n.icure-text-field .icure-label-extra, .icure-button-group .icure-label-extra {\n display: flex;\n width: 100%;\n gap: 12px;\n}\n.icure-text-field .icure-label, .icure-button-group .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n left: 9px;\n color: #084B83;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n}\n.icure-text-field > .icure-label {\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n}\n.icure-text-field > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label.side {\n position: relative;\n}\n.icure-text-field > .icure-label.side.left {\n order: -1;\n margin-right: 1em;\n}\n.icure-text-field > .icure-label.side.right {\n order: 1;\n margin-left: 1em;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container {\n padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-color: #DDE3E7;\n border-radius: 2px;\n box-sizing: border-box;\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 color: #000000;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .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 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 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 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 padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #000000;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .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 padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .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 opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path,\n.icure-text-field .input-container .extra .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path:hover,\n.icure-text-field .input-container .extra .btn svg path:hover {\n fill: #656565;\n opacity: 1;\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\n.icure-button {\n display: flex;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: normal;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.icure-button-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\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: 12px;\n top: calc(1.4em + 1px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #084B83;\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}\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-button-group > .icure-label.above, .icure-button-group.has-content > .icure-label, .icure-button-group:focus > .icure-label, .icure-button-group:focus-within > .icure-label {\n font-weight: 500;\n height: 1.4em;\n}` \n\nexport class IcureDropdownField extends FieldWithOptionsMixin(Field) {\n\t@property() placeholder = ''\n\n\t@state() protected displayMenu = false\n\t@state() protected textInputValue?: string = undefined\n\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\n\t}\n\n\ttogglePopup(event: MouseEvent, force = false): void {\n\t\tif (this.readonly) return\n\t\tthis.displayMenu = force || !this.displayMenu\n\t\tconsole.log('togglePopup', this.textInputValue)\n\t}\n\n\t_handleClickOutside(event: MouseEvent): void {\n\t\tif (!event.composedPath().includes(this)) {\n\t\t\tif (this.displayMenu) {\n\t\t\t\tconsole.log(this.label)\n\t\t\t\tthis.displayMenu = false\n\t\t\t}\n\t\t\tevent.stopPropagation()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tdocument.addEventListener('click', this._handleClickOutside.bind(this))\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tdocument.removeEventListener('click', this._handleClickOutside.bind(this))\n\t}\n\n\ttextInputChanged(): (e: Event) => void {\n\t\treturn (e: Event) => {\n\t\t\tconst target = e.target as HTMLInputElement\n\t\t\tconst textInputValue = target.value\n\t\t\tthis.textInputValue = textInputValue\n\t\t\tthis.triggerSearch(textInputValue)\n\t\t}\n\t}\n\n\tprivate triggerSearch(textInputValue: string | undefined, cooldown = 500) {\n\t\tsetTimeout(() => {\n\t\t\tif (textInputValue === this.textInputValue) {\n\t\t\t\tthis.optionsProvider?.(this.language(), textInputValue ? [textInputValue] : []).then((options) => {\n\t\t\t\t\tif (textInputValue === this.textInputValue) {\n\t\t\t\t\t\tthis.displayedOptions = options\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}, cooldown)\n\t}\n\n\thandleOptionButtonClicked(id: string | undefined): (e: Event) => boolean {\n\t\treturn (e: Event) => {\n\t\t\te.preventDefault()\n\t\t\te.stopPropagation()\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tif (id) {\n\t\t\t\tconst code = this.displayedOptions?.find((option) => option.id === id)\n\t\t\t\tconst inputValue = this.displayedOptions?.find((option) => option.id === id)?.['label']?.[this.language()] ?? ''\n\t\t\t\tthis.displayMenu = false\n\t\t\t\tthis.textInputValue = undefined\n\t\t\t\tthis.handleValueChanged?.(\n\t\t\t\t\tthis.label,\n\t\t\t\t\tthis.language(),\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: { [this.language()]: { type: 'string', value: inputValue } },\n\t\t\t\t\t\tcodes: code ? [code] : [],\n\t\t\t\t\t},\n\t\t\t\t\tvalueId,\n\t\t\t\t)\n\t\t\t\tthis.triggerSearch(undefined, 0)\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\n\tgetValueFromProvider(): [string, string] | [undefined, undefined] {\n\t\tconst [id, versions] = extractSingleValue(this.valueProvider?.())\n\t\tif (versions) {\n\t\t\tconst value = versions[0]?.value\n\t\t\tconst valueForLanguage = value?.content?.[this.language()] ?? ''\n\t\t\tif (valueForLanguage && valueForLanguage.type === 'string' && valueForLanguage.value) {\n\t\t\t\treturn [id, valueForLanguage.value]\n\t\t\t} else if (value?.codes?.length) {\n\t\t\t\treturn [id, value?.codes?.[0]?.label?.[this.language()] ?? '']\n\t\t\t}\n\t\t}\n\t\treturn [undefined, undefined]\n\t}\n\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\n\t\tconst [, inputValue] = this.getValueFromProvider() ?? ''\n\t\tconst validationError = this.validationErrorsProvider?.()?.length\n\n\t\treturn html`\n\t\t\t<div id=\"root\" class=\"icure-text-field ${inputValue != '' ? 'has-content' : ''}\" data-placeholder=${this.placeholder}>\n\t\t\t\t${this.displayedLabels ? generateLabels(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : nothing}\n\t\t\t\t<div class=\"icure-input ${validationError && 'icure-input__validationError'}\" id=\"test\" @click=\"${(event: MouseEvent) => this.togglePopup(event, true)}\">\n\t\t\t\t\t<input type=\"text\" id=\"editor\" style=\"outline: none\" .value=${this.textInputValue ?? inputValue ?? ''} @input=\"${this.textInputChanged()}\" autocomplete=\"off\" />\n\t\t\t\t\t<div id=\"extra\" class=${'extra forced'}>\n\t\t\t\t\t\t<button class=\"btn select-arrow\" @click=\"${this.togglePopup}\">${dropdownPicto}</button>\n\t\t\t\t\t\t${this.displayMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"options\">\n\t\t\t\t\t\t\t\t\t\t${this.displayedOptions?.map(\n\t\t\t\t\t\t\t\t\t\t\t(x) =>\n\t\t\t\t\t\t\t\t\t\t\t\thtml`<button @click=\"${this.handleOptionButtonClicked(x.id)}\" id=\"${x.id}\" class=\"option ${x?.['label']?.[this.language()] === inputValue ? 'selected' : ''}\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t${x?.['label']?.[this.language()] || ''}\n\t\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"error\">${this.validationErrorsProvider?.().map(([, error]) => html`<div>${this.translationProvider?.(this.language(), error)}</div>`)}</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-dropdown-field/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAmE;AACnE,qDAAmD;AACnD,kDAAsD;AACtD,sCAAiC;AACjC,2CAAgD;AAChD,sDAA+D;AAC/D,qEAAoE;AACpE,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,mBAAmB,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,OAAO,CAAC,0CAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;eACxJ,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,OAAO,CAAC,0CAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAI,EAAE;sBAC9B,CAAA;aAAA,CACX;;UAED;YACH,CAAC,CAAC,EAAE;;;yBAGc,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,WAAC,OAAA,IAAA,UAAI,EAAA,QAAQ,MAAA,IAAI,CAAC,mBAAmB,qDAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAA,EAAA,CAAC;;GAEjI,CAAA;IACF,CAAC;CACD;AAtID,gDAsIC;AArIY;IAAX,IAAA,wBAAQ,GAAE;;uDAAiB;AAET;IAAlB,IAAA,qBAAK,GAAE;;uDAA8B;AACnB;IAAlB,IAAA,qBAAK,GAAE;;0DAA8C","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { dropdownPicto } from '../common/styles/paths'\nimport { Field } from '../common'\nimport { generateLabels } from '../common/utils'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { FieldWithOptionsMixin } from '../common/field-with-options'\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n.tab-container .tab-bar li {\n display: inline-block;\n padding: 8px 16px;\n cursor: pointer;\n color: #000000;\n font-size: 14px;\n font-weight: 500;\n}\n.tab-container .tab-bar li.active {\n background-color: #656565;\n color: white;\n}\n.tab-container .tab-content .tab {\n display: none;\n}\n.tab-container .tab-content .tab.active {\n display: block;\n}\n\n:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\n width: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n.ProseMirror p {\n margin-bottom: 1em;\n}\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n.ProseMirror li {\n position: relative;\n}\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\nli.ProseMirror-selectednode :after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor,\n.editor {\n color: rgb(101, 101, 101);\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n display: flex;\n align-items: flex-end;\n}\n\n.icure-input {\n background: #edf2f7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n#editor.tokens-list .ProseMirror, #editor.styled-tokens-list .ProseMirror {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n#editor.tokens-list .ProseMirror li, #editor.styled-tokens-list .ProseMirror li {\n display: flex;\n flex-direction: row;\n border-radius: 8px;\n padding: 2px 4px;\n margin-right: 2px;\n background-color: #dadada;\n border-color: rgba(42, 61, 108, 0.44);\n min-height: 20px;\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n display: inline-block;\n min-height: 18px;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.items-list .ProseMirror {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: 6px;\n}\n#editor.items-list .ProseMirror li {\n list-style-type: none;\n width: 100%;\n padding-bottom: 4px;\n border-bottom: 1px dotted rgba(128, 128, 128, 0.5098039216);\n}\n#editor.items-list .ProseMirror li:last-child {\n border-bottom: none;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.icure-input-metadata-container {\n display: flex;\n}\n.icure-input-metadata-container .icure-metadata-container {\n display: flex;\n flex-grow: 1;\n padding: 0 4px;\n border: 1px solid #DDE3E7;\n border-left: none;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-sizing: border-box;\n}\n.icure-input-metadata-container .icure-metadata-container__validationError {\n border-color: red;\n}\n\n.extra {\n min-width: 20px;\n width: auto;\n height: 20px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n.extra:hover .info {\n display: none;\n}\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n display: unset !important;\n}\n.extra.forced .info, .extra.forced .extra .info.hidden {\n opacity: 0 !important;\n z-index: 0 !important;\n display: none;\n}\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n.extra--metadataButtonsBar {\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 4px;\n}\n.extra .info {\n color: #809ab4;\n font-size: 15px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: center;\n}\n.extra .info span {\n font-weight: 700;\n}\n.extra .info.hidden {\n display: none;\n}\n.extra .buttons-container {\n display: flex;\n height: 20px;\n width: auto;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n z-index: 1000;\n}\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n display: none;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.extra .buttons-container .btn svg {\n width: 15px;\n height: 15px;\n}\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n.extra .buttons-container .btn.forced {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra .buttons-container .btn.forced svg path {\n fill: crimson !important;\n}\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -21px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n@keyframes slideIn {\n 0% {\n top: 0;\n opacity: 0;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n display: flex;\n align-items: center;\n height: fit-content;\n}\n.menu-container .item {\n height: 30px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\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.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n font-weight: 500;\n border-radius: 4px;\n}\n\n.value-date-menu {\n width: unset !important;\n}\n\n.menu {\n display: flex;\n flex-direction: column;\n gap: 2px;\n position: absolute;\n top: 32px;\n right: -12px;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n.menu .input-container {\n background: #edf2f7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);\n}\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: flex;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\nspan.date {\n margin-right: 1px;\n}\nspan.time {\n margin-left: 1px;\n}\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #ffffff;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: hsl(194, 100%, 50%);\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n.companion:hover {\n font-weight: 700;\n background: hsl(202, 100%, 50%);\n}\n\n*::selection {\n background-color: hsla(194, 100%, 50%, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: rgb(39, 71, 104);\n}\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: rgb(128, 154, 180);\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after,\nspan.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after,\nspan.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after,\nspan.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}\n\n.selected-option {\n padding: 2px;\n margin-right: 5px;\n}\n\n.options {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: auto;\n min-width: 100%;\n overflow-y: auto;\n padding: 2px;\n border-radius: 6px;\n}\n.options--subformView {\n top: 46px;\n min-width: unset;\n left: unset;\n right: 0;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: 260px;\n overflow-y: auto;\n max-height: 280px;\n}\n\napp-date-picker {\n --app-primary: #084B83;\n --app-hover: #5b7da2;\n --app-selected-hover: #5b7da2;\n}\n\n.option {\n height: 28px;\n min-height: 28px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #545454;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n padding: 4px 8px;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n cursor: pointer;\n}\n.option:hover {\n color: #656565;\n background-color: #ededed;\n}\n\n.select-arrow {\n border: none;\n background: 0px 0px;\n position: relative;\n top: 0px;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0px;\n}\n\n.hidden {\n display: none;\n}\n\n.container {\n position: relative;\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n display: grid;\n position: relative;\n padding: 8px;\n border-radius: 6px;\n background-color: #e7f0fd;\n gap: 12px;\n}\n.subform__heading {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: auto;\n}\n.subform__heading__title {\n padding: 0;\n margin: 0;\n}\n.subform__addBtn, .subform__removeBtn {\n cursor: pointer;\n background-color: #084B83;\n color: white;\n height: 32px;\n padding: 0 16px;\n border-radius: 6px;\n border: none;\n outline: none;\n}\n.subform__addBtn:hover, .subform__removeBtn:hover {\n background-color: #3D87C5;\n}\n.subform__removeBtn {\n justify-self: end;\n border: 1px solid #DDE3E7;\n background-color: #FCFCFD;\n color: #084B83;\n}\n.subform__removeBtn:hover {\n background-color: #F2F2F2;\n}\n.subform__child {\n display: grid;\n grid-template-rows: auto;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: white;\n border: 1px solid #3D87C5;\n}\n.subform__child__title {\n padding: 12px !important;\n border-radius: 6px;\n margin: 0;\n background-color: #BFE8EA;\n}\n.subform__child .subform {\n background: unset;\n margin: 0;\n padding: 0;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 16px 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n.icure-form hr {\n display: block;\n margin-top: 20px;\n border-top: 1px solid rgba(8, 75, 131, 0.13);\n margin-bottom: 20px;\n}\n.icure-form h2 {\n font-size: add-two(12px, 0, 1.2);\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: add-two(12px, 0, 1.1);\n font-weight: 500;\n color: #084B83;\n padding: 6px;\n}\n.icure-form .group.bordered {\n background: #f6f6f6;\n border-radius: 12px;\n}\n\n.icure-form-field {\n display: grid;\n align-items: flex-start;\n}\n\n.error {\n color: red;\n font-size: 12px;\n margin-top: 4px;\n}\n\n.icure-text-field .icure-label-extra, .icure-button-group .icure-label-extra {\n display: flex;\n width: 100%;\n gap: 12px;\n}\n.icure-text-field .icure-label, .icure-button-group .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n left: add-two(8px, 1px);\n color: #084B83;\n align-items: center;\n text-wrap: auto;\n min-height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {\n display: flex;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n}\n.icure-text-field > .icure-label {\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n}\n.icure-text-field > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label.side {\n position: relative;\n}\n.icure-text-field > .icure-label.side.left {\n order: -1;\n margin-right: 1em;\n}\n.icure-text-field > .icure-label.side.right {\n order: 1;\n margin-left: 1em;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container {\n padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-color: #DDE3E7;\n border-radius: 2px;\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 color: #000000;\n}\n.icure-text-field .icure-input .reset-button,\n.icure-text-field .input-container .reset-button {\n position: absolute;\n right: 0;\n border: none;\n background: transparent;\n top: 0;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.icure-text-field .icure-input .reset-button svg,\n.icure-text-field .input-container .reset-button svg {\n width: 15px;\n height: 15px;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .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 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 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 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 padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #000000;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .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 padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .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 opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path,\n.icure-text-field .input-container .extra .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path:hover,\n.icure-text-field .input-container .extra .btn svg path:hover {\n fill: #656565;\n opacity: 1;\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\n.icure-button {\n display: flex;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: normal;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.icure-button-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\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: 12px;\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: #084B83;\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}\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-button-group > .icure-label.above, .icure-button-group.has-content > .icure-label, .icure-button-group:focus > .icure-label, .icure-button-group:focus-within > .icure-label {\n font-weight: 500;\n height: 1.4em;\n}` \nimport { icureFormLogging } from '../../index'\nimport { FieldMetadata } from '../model'\n\nexport class IcureDropdownField extends FieldWithOptionsMixin(Field) {\n\t@property() placeholder = ''\n\n\t@state() protected displayMenu = false\n\t@state() protected textInputValue?: string = undefined\n\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\n\t}\n\n\ttogglePopup(event: MouseEvent, force = false): void {\n\t\tif (this.readonly) return\n\t\tthis.displayMenu = force || !this.displayMenu\n\t\tconsole.log('togglePopup', this.textInputValue)\n\t}\n\n\t_handleClickOutside(event: MouseEvent): void {\n\t\tif (!event.composedPath().includes(this)) {\n\t\t\tif (this.displayMenu) {\n\t\t\t\tconsole.log(this.label)\n\t\t\t\tthis.displayMenu = false\n\t\t\t}\n\t\t\tevent.stopPropagation()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tdocument.addEventListener('click', this._handleClickOutside.bind(this))\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tdocument.removeEventListener('click', this._handleClickOutside.bind(this))\n\t}\n\n\ttextInputChanged(): (e: Event) => void {\n\t\treturn (e: Event) => {\n\t\t\tconst target = e.target as HTMLInputElement\n\t\t\tconst textInputValue = target.value\n\t\t\tthis.textInputValue = textInputValue\n\t\t\tthis.triggerSearch(textInputValue)\n\t\t}\n\t}\n\n\tprivate triggerSearch(textInputValue: string | undefined, cooldown = 500) {\n\t\tsetTimeout(() => {\n\t\t\tif (textInputValue === this.textInputValue) {\n\t\t\t\tthis.optionsProvider?.(this.language(), textInputValue ? [textInputValue] : []).then((options) => {\n\t\t\t\t\tif (textInputValue === this.textInputValue) {\n\t\t\t\t\t\tthis.displayedOptions = options\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}, cooldown)\n\t}\n\n\thandleOptionButtonClicked(id: string | undefined): (e: Event) => boolean {\n\t\treturn (e: Event) => {\n\t\t\te.preventDefault()\n\t\t\te.stopPropagation()\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tif (id) {\n\t\t\t\tconst code = this.displayedOptions?.find((option) => option.id === id)\n\t\t\t\tconst inputValue = this.displayedOptions?.find((option) => option.id === id)?.['label']?.[this.language()] ?? ''\n\t\t\t\tthis.displayMenu = false\n\t\t\t\tthis.textInputValue = undefined\n\t\t\t\tthis.handleValueChanged?.(\n\t\t\t\t\tthis.label,\n\t\t\t\t\tthis.language(),\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: { [this.language()]: { type: 'string', value: inputValue } },\n\t\t\t\t\t\tcodes: code ? [code] : [],\n\t\t\t\t\t},\n\t\t\t\t\tvalueId,\n\t\t\t\t)\n\t\t\t\tthis.triggerSearch(undefined, 0)\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\n\tgetValueFromProvider(): [string, string] | [undefined, undefined] {\n\t\tconst [id, versions] = extractSingleValue(this.valueProvider?.())\n\t\tif (versions) {\n\t\t\tconst value = versions[0]?.value\n\t\t\tconst valueForLanguage = value?.content?.[this.language()] ?? ''\n\t\t\tif (valueForLanguage && valueForLanguage.type === 'string' && valueForLanguage.value) {\n\t\t\t\treturn [id, valueForLanguage.value]\n\t\t\t} else if (value?.codes?.length) {\n\t\t\t\treturn [id, value?.codes?.[0]?.label?.[this.language()] ?? '']\n\t\t\t}\n\t\t}\n\t\treturn [undefined, undefined]\n\t}\n\n\toverride renderSync({ validationErrors }: { validationErrors: [FieldMetadata, string][] }): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\n\t\tif (icureFormLogging) {\n\t\t\tconsole.log(`Rendering dropdown ${this.label}`)\n\t\t}\n\n\t\tconst [, inputValue] = this.getValueFromProvider() ?? ''\n\t\tconst validationError = validationErrors.length\n\n\t\treturn html`\n\t\t\t<div id=\"root\" class=\"icure-text-field ${inputValue != '' ? 'has-content' : ''}\" data-placeholder=${this.placeholder}>\n\t\t\t\t${this.displayedLabels ? generateLabels(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : nothing}\n\t\t\t\t<div class=\"icure-input ${validationError && 'icure-input__validationError'}\" id=\"test\" @click=\"${(event: MouseEvent) => this.togglePopup(event, true)}\">\n\t\t\t\t\t<input type=\"text\" id=\"editor\" style=\"outline: none\" .value=${this.textInputValue ?? inputValue ?? ''} @input=\"${this.textInputChanged()}\" autocomplete=\"off\" />\n\t\t\t\t\t<div id=\"extra\" class=${'extra forced'}>\n\t\t\t\t\t\t<button class=\"btn select-arrow\" @click=\"${this.togglePopup}\">${dropdownPicto}</button>\n\t\t\t\t\t\t${this.displayMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"options\">\n\t\t\t\t\t\t\t\t\t\t${this.displayedOptions?.map(\n\t\t\t\t\t\t\t\t\t\t\t(x) =>\n\t\t\t\t\t\t\t\t\t\t\t\thtml`<button @click=\"${this.handleOptionButtonClicked(x.id)}\" id=\"${x.id}\" class=\"option ${x?.['label']?.[this.language()] === inputValue ? 'selected' : ''}\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t${x?.['label']?.[this.language()] || ''}\n\t\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"error\">${validationErrors.map(([, error]) => html`<div>${this.translationProvider?.(this.language(), error)}</div>`)}</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -7,10 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Button = void 0;
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
15
|
+
require("../../../icure-label");
|
|
16
|
+
class Button extends lit_1.LitElement {
|
|
14
17
|
constructor() {
|
|
15
18
|
super(...arguments);
|
|
16
19
|
this.visible = true;
|
|
@@ -21,14 +24,14 @@ export class Button extends LitElement {
|
|
|
21
24
|
//override
|
|
22
25
|
static get styles() {
|
|
23
26
|
return [
|
|
24
|
-
css `
|
|
27
|
+
(0, lit_1.css) `
|
|
25
28
|
:host {
|
|
26
29
|
}
|
|
27
30
|
`,
|
|
28
31
|
];
|
|
29
32
|
}
|
|
30
33
|
render() {
|
|
31
|
-
return html `<icure-button
|
|
34
|
+
return (0, lit_1.html) `<icure-button
|
|
32
35
|
.visible="${this.visible}"
|
|
33
36
|
label="${this.label}"
|
|
34
37
|
.translationProvider="${this.translationProvider}"
|
|
@@ -39,32 +42,33 @@ export class Button extends LitElement {
|
|
|
39
42
|
></icure-button>`;
|
|
40
43
|
}
|
|
41
44
|
}
|
|
45
|
+
exports.Button = Button;
|
|
42
46
|
__decorate([
|
|
43
|
-
property(),
|
|
47
|
+
(0, decorators_js_1.property)(),
|
|
44
48
|
__metadata("design:type", String)
|
|
45
49
|
], Button.prototype, "label", void 0);
|
|
46
50
|
__decorate([
|
|
47
|
-
property(),
|
|
51
|
+
(0, decorators_js_1.property)(),
|
|
48
52
|
__metadata("design:type", Object)
|
|
49
53
|
], Button.prototype, "visible", void 0);
|
|
50
54
|
__decorate([
|
|
51
|
-
property(),
|
|
55
|
+
(0, decorators_js_1.property)(),
|
|
52
56
|
__metadata("design:type", Object)
|
|
53
57
|
], Button.prototype, "defaultLanguage", void 0);
|
|
54
58
|
__decorate([
|
|
55
|
-
property(),
|
|
59
|
+
(0, decorators_js_1.property)(),
|
|
56
60
|
__metadata("design:type", Function)
|
|
57
61
|
], Button.prototype, "translationProvider", void 0);
|
|
58
62
|
__decorate([
|
|
59
|
-
property(),
|
|
63
|
+
(0, decorators_js_1.property)(),
|
|
60
64
|
__metadata("design:type", Function)
|
|
61
65
|
], Button.prototype, "actionListener", void 0);
|
|
62
66
|
__decorate([
|
|
63
|
-
property(),
|
|
67
|
+
(0, decorators_js_1.property)(),
|
|
64
68
|
__metadata("design:type", String)
|
|
65
69
|
], Button.prototype, "event", void 0);
|
|
66
70
|
__decorate([
|
|
67
|
-
property(),
|
|
71
|
+
(0, decorators_js_1.property)(),
|
|
68
72
|
__metadata("design:type", Object)
|
|
69
73
|
], Button.prototype, "payload", void 0);
|
|
70
74
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/button/button.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/button/button.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAA2E;AAC3E,qDAA4C;AAE5C,gCAA6B;AAE7B,MAAa,MAAO,SAAQ,gBAAU;IAAtC;;QAYa,YAAO,GAAG,IAAI,CAAA;QACd,oBAAe,GAAG,IAAI,CAAA;QACtB,wBAAmB,GAA+C,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;QAC1F,mBAAc,GAA8C,GAAG,EAAE,CAAC,SAAS,CAAA;IAexF,CAAC;IA7BA,UAAU;IACV,MAAM,KAAK,MAAM;QAChB,OAAO;YACN,IAAA,SAAG,EAAA;;;IAGF;SACD,CAAA;IACF,CAAC;IAUD,MAAM;QACL,OAAO,IAAA,UAAI,EAAA;eACE,IAAI,CAAC,OAAO;YACf,IAAI,CAAC,KAAK;2BACK,IAAI,CAAC,mBAAmB;uBAC5B,IAAI,CAAC,eAAe;sBACrB,IAAI,CAAC,cAAc;aAC5B,IAAI,CAAC,KAAK;eACR,IAAI,CAAC,OAAO;mBACR,CAAA;IAClB,CAAC;CACD;AA9BD,wBA8BC;AAnBY;IAAX,IAAA,wBAAQ,GAAE;;qCAAe;AACd;IAAX,IAAA,wBAAQ,GAAE;;uCAAe;AACd;IAAX,IAAA,wBAAQ,GAAE;;+CAAuB;AACtB;IAAX,IAAA,wBAAQ,GAAE;;mDAA2F;AAC1F;IAAX,IAAA,wBAAQ,GAAE;;8CAA4E;AAC3E;IAAX,IAAA,wBAAQ,GAAE;;qCAAc;AACb;IAAX,IAAA,wBAAQ,GAAE;;uCAAiB","sourcesContent":["import { css, CSSResultGroup, html, LitElement, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport '../../../icure-label'\n\nexport class Button extends LitElement {\n\t//override\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [\n\t\t\tcss`\n\t\t\t\t:host {\n\t\t\t\t}\n\t\t\t`,\n\t\t]\n\t}\n\n\t@property() label?: string\n\t@property() visible = true\n\t@property() defaultLanguage = 'en'\n\t@property() translationProvider: (language: string, text: string) => string = (language, text) => text\n\t@property() actionListener: (event: string, payload: unknown) => void = () => undefined\n\t@property() event: string\n\t@property() payload: unknown\n\n\trender(): TemplateResult {\n\t\treturn html`<icure-button\n\t\t\t.visible=\"${this.visible}\"\n\t\t\tlabel=\"${this.label}\"\n\t\t\t.translationProvider=\"${this.translationProvider}\"\n\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t.actionListener=\"${this.actionListener}\"\n\t\t\t.event=\"${this.event}\"\n\t\t\t.payload=\"${this.payload}\"\n\t\t></icure-button>`\n\t}\n}\n"]}
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./button"), exports);
|
|
2
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/button/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB","sourcesContent":["export * from './button'\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
1
2
|
import { Field } from '../../../common';
|
|
2
3
|
import { Code } from '../../../model';
|
|
3
4
|
export declare class CheckBox extends Field {
|
|
4
5
|
optionsProvider: (language: string, searchTerm?: string) => Promise<Code[]>;
|
|
5
|
-
|
|
6
|
+
renderSync(): TemplateResult[];
|
|
6
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -16,20 +17,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
16
17
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17
18
|
});
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.CheckBox = void 0;
|
|
22
|
+
const lit_1 = require("lit");
|
|
23
|
+
const common_1 = require("../../../common");
|
|
24
|
+
const utils_1 = require("../utils");
|
|
25
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
26
|
+
class CheckBox extends common_1.Field {
|
|
24
27
|
constructor() {
|
|
25
28
|
super(...arguments);
|
|
26
29
|
this.optionsProvider = () => __awaiter(this, void 0, void 0, function* () { return []; });
|
|
27
30
|
}
|
|
28
|
-
|
|
31
|
+
renderSync() {
|
|
29
32
|
var _a;
|
|
30
33
|
const versionedValues = (_a = this.valueProvider) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
31
34
|
return (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {
|
|
32
|
-
return html `
|
|
35
|
+
return (0, lit_1.html) `
|
|
33
36
|
<icure-button-group
|
|
34
37
|
type="checkbox"
|
|
35
38
|
.readonly="${this.readonly}"
|
|
@@ -42,19 +45,20 @@ export class CheckBox extends Field {
|
|
|
42
45
|
.ownersProvider=${this.ownersProvider}
|
|
43
46
|
.optionsProvider=${this.optionsProvider}
|
|
44
47
|
.translationProvider=${this.translationProvider}
|
|
45
|
-
.valueProvider=${singleValueProvider(this.valueProvider, id)}
|
|
48
|
+
.valueProvider=${(0, utils_1.singleValueProvider)(this.valueProvider, id)}
|
|
46
49
|
.validationErrorsProvider=${this.validationErrorsProvider}
|
|
47
50
|
.metadataProvider=${this.metadataProvider}
|
|
48
|
-
.handleValueChanged=${handleSingleValueChanged(this.handleValueChanged, id)}
|
|
49
|
-
.handleMetadataChanged=${handleSingleMetadataChanged(this.handleMetadataChanged, id)}
|
|
51
|
+
.handleValueChanged=${(0, utils_1.handleSingleValueChanged)(this.handleValueChanged, id)}
|
|
52
|
+
.handleMetadataChanged=${(0, utils_1.handleSingleMetadataChanged)(this.handleMetadataChanged, id)}
|
|
50
53
|
.styleOptions=${this.styleOptions}
|
|
51
54
|
></icure-button-group>
|
|
52
55
|
`;
|
|
53
56
|
});
|
|
54
57
|
}
|
|
55
58
|
}
|
|
59
|
+
exports.CheckBox = CheckBox;
|
|
56
60
|
__decorate([
|
|
57
|
-
property(),
|
|
61
|
+
(0, decorators_js_1.property)(),
|
|
58
62
|
__metadata("design:type", Function)
|
|
59
63
|
], CheckBox.prototype, "optionsProvider", void 0);
|
|
60
64
|
//# sourceMappingURL=checkbox.js.map
|