@icure/form 2.0.11 → 2.1.0
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.4-31bc1b0001-934b0a0460.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.4.0-e5ef5fbeba-e267c25576.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.1-3875228c32-b9bbc9c089.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.23-68ac3c21d2-aad6c9ddc4.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.1-b5bc114ced-5925326176.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.1-e3722d4f4a-de07c66945.zip +0 -0
- package/.yarn/cache/lit-npm-2.8.0-92bb1333a4-2480e733f7.zip +0 -0
- package/.yarn/cache/lit-npm-3.3.1-8f683c51f1-fb88f1ff80.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.4.1-ad68c86bb7-90f9bf59bc.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.3-95b23ed79b-2720e49795.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.3-d6540e44ad-28857d935c.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.10.4-f765dfe652-7b8b3ed82c.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.41.2-7f800b4d2b-263f15bec9.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 +5 -2
- package/components/icure-text-field/index.js +252 -142
- 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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/cache/@material-animation-npm-14.0.0-canary.53b3cad2f.0-06a813cdea-9b5190654c.zip
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/cache/@material-elevation-npm-14.0.0-canary.53b3cad2f.0-3312f06793-2f8945c7b6.zip
ADDED
|
Binary file
|
|
Binary file
|
package/.yarn/cache/@material-floating-label-npm-14.0.0-canary.53b3cad2f.0-eb8f330f2f-5295dc481d.zip
ADDED
|
Binary file
|
package/.yarn/cache/@material-focus-ring-npm-14.0.0-canary.53b3cad2f.0-b22f851a2e-92273b1247.zip
ADDED
|
Binary file
|
package/.yarn/cache/@material-icon-button-npm-14.0.0-canary.53b3cad2f.0-e158d26048-19b51665f2.zip
ADDED
|
Binary file
|
package/.yarn/cache/@material-line-ripple-npm-14.0.0-canary.53b3cad2f.0-d089468db9-6518961487.zip
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/cache/@material-menu-surface-npm-14.0.0-canary.53b3cad2f.0-52212f38f4-ad48e168ca.zip
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/cache/@material-textfield-npm-14.0.0-canary.53b3cad2f.0-4414808dda-7072e3c9df.zip
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/cache/@material-touch-target-npm-14.0.0-canary.53b3cad2f.0-fa6a2d0875-dbc13cbe7a.zip
ADDED
|
Binary file
|
package/.yarn/cache/@material-typography-npm-14.0.0-canary.53b3cad2f.0-f4a58946f1-fa2671df40.zip
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Field } from './field';
|
|
2
2
|
import { Code } from '../model';
|
|
3
|
-
export declare class FieldWithOptionsMixinInterface extends Field {
|
|
3
|
+
export declare abstract class FieldWithOptionsMixinInterface extends Field {
|
|
4
4
|
optionsProvider: (language: string, terms?: string[]) => Promise<Code[]>;
|
|
5
5
|
displayedOptions: Code[];
|
|
6
6
|
}
|
|
7
|
-
type Constructor<T extends Field> = new (...args: any[]) => T;
|
|
7
|
+
type Constructor<T extends Field> = abstract new (...args: any[]) => T;
|
|
8
8
|
export declare const FieldWithOptionsMixin: <T extends Constructor<Field>>(superClass: T) => Constructor<FieldWithOptionsMixinInterface> & T;
|
|
9
9
|
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);
|
|
@@ -16,9 +17,10 @@ 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
|
-
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.FieldWithOptionsMixin = void 0;
|
|
22
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
23
|
+
const FieldWithOptionsMixin = (superClass) => {
|
|
22
24
|
class FieldWithOptionsMixinClass extends superClass {
|
|
23
25
|
constructor() {
|
|
24
26
|
super(...arguments);
|
|
@@ -33,14 +35,15 @@ export const FieldWithOptionsMixin = (superClass) => {
|
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
__decorate([
|
|
36
|
-
property(),
|
|
38
|
+
(0, decorators_js_1.property)(),
|
|
37
39
|
__metadata("design:type", Function)
|
|
38
40
|
], FieldWithOptionsMixinClass.prototype, "optionsProvider", void 0);
|
|
39
41
|
__decorate([
|
|
40
|
-
state(),
|
|
42
|
+
(0, decorators_js_1.state)(),
|
|
41
43
|
__metadata("design:type", Array)
|
|
42
44
|
], FieldWithOptionsMixinClass.prototype, "displayedOptions", void 0);
|
|
43
45
|
// Cast return type to the superClass type passed in
|
|
44
46
|
return FieldWithOptionsMixinClass;
|
|
45
47
|
};
|
|
48
|
+
exports.FieldWithOptionsMixin = FieldWithOptionsMixin;
|
|
46
49
|
//# sourceMappingURL=field-with-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-with-options.js","sourceRoot":"","sources":["../../../tmp/components/common/field-with-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-with-options.js","sourceRoot":"","sources":["../../../tmp/components/common/field-with-options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,qDAAmD;AAS5C,MAAM,qBAAqB,GAAG,CAA+B,UAAa,EAAE,EAAE;IACpF,MAAe,0BAA2B,SAAQ,UAAU;QAA5D;;YACa,oBAAe,GAA4D,GAAS,EAAE,gDAAC,OAAA,EAAE,CAAA,GAAA,CAAA;YAC5F,qBAAgB,GAAW,EAAE,CAAA;QAQvC,CAAC;QANO,YAAY,CAAC,kBAAkC;YACrD,KAAK,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAA;YACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAO,OAAO,EAAE,EAAE;gBAC5D,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAA;YAChC,CAAC,CAAA,CAAC,CAAA;QACH,CAAC;KACD;IATY;QAAX,IAAA,wBAAQ,GAAE;;uEAA0F;IAC5F;QAAR,IAAA,qBAAK,GAAE;;wEAA8B;IASvC,oDAAoD;IACpD,OAAO,0BAA6E,CAAA;AACrF,CAAC,CAAA;AAdY,QAAA,qBAAqB,yBAcjC","sourcesContent":["import { Field } from './field'\nimport { PropertyValues } from '@lit/reactive-element'\nimport { Code } from '../model'\nimport { property, state } from 'lit/decorators.js'\n\nexport declare abstract class FieldWithOptionsMixinInterface extends Field {\n\toptionsProvider: (language: string, terms?: string[]) => Promise<Code[]>\n\tdisplayedOptions: Code[]\n}\n\ntype Constructor<T extends Field> = abstract new (...args: any[]) => T\n\nexport const FieldWithOptionsMixin = <T extends Constructor<Field>>(superClass: T) => {\n\tabstract class FieldWithOptionsMixinClass extends superClass {\n\t\t@property() optionsProvider: (language: string, terms?: string[]) => Promise<Code[]> = async () => []\n\t\t@state() displayedOptions: Code[] = []\n\n\t\tpublic firstUpdated(_changedProperties: PropertyValues) {\n\t\t\tsuper.firstUpdated(_changedProperties)\n\t\t\tthis.optionsProvider(this.language()).then(async (options) => {\n\t\t\t\tthis.displayedOptions = options\n\t\t\t})\n\t\t}\n\t}\n\t// Cast return type to the superClass type passed in\n\treturn FieldWithOptionsMixinClass as Constructor<FieldWithOptionsMixinInterface> & T\n}\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
2
|
import { FieldMetadata, FieldValue, Labels } from '../model';
|
|
3
3
|
import { Suggestion, VersionedData } from '../../generic';
|
|
4
|
+
import { Task } from '@lit/task';
|
|
4
5
|
/**
|
|
5
6
|
* Base class for all fields.
|
|
6
7
|
*/
|
|
7
|
-
export declare class Field extends LitElement {
|
|
8
|
+
export declare abstract class Field extends LitElement {
|
|
8
9
|
/**
|
|
9
10
|
* The label of the field. This is a unique per form property that is used to create data in the formValuesContainer.
|
|
10
11
|
*/
|
|
@@ -38,8 +39,9 @@ export declare class Field extends LitElement {
|
|
|
38
39
|
/**
|
|
39
40
|
* Provides the value of the field.
|
|
40
41
|
*/
|
|
42
|
+
defaultValueProvider?: () => FieldValue;
|
|
41
43
|
valueProvider?: () => VersionedData<FieldValue>;
|
|
42
|
-
validationErrorsProvider?: () => string[]
|
|
44
|
+
validationErrorsProvider?: () => Promise<[FieldMetadata, string][]>;
|
|
43
45
|
ownersProvider: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]>;
|
|
44
46
|
metadataProvider?: (id: string, revisions: (string | null)[]) => VersionedData<FieldMetadata>;
|
|
45
47
|
handleValueChanged?: (label: string, language: string, value?: FieldValue, id?: string) => string | undefined;
|
|
@@ -49,5 +51,10 @@ export declare class Field extends LitElement {
|
|
|
49
51
|
displayMetadata: boolean;
|
|
50
52
|
selectedLanguage?: string;
|
|
51
53
|
selectedRevision?: string;
|
|
54
|
+
_asyncTask: Task<readonly [], [FieldMetadata, string][] | readonly []>;
|
|
52
55
|
language(): string;
|
|
56
|
+
render(): TemplateResult | TemplateResult[] | undefined;
|
|
57
|
+
abstract renderSync({}: {
|
|
58
|
+
validationErrors: [FieldMetadata, string][];
|
|
59
|
+
}): TemplateResult | TemplateResult[] | undefined;
|
|
53
60
|
}
|
|
@@ -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,12 +17,15 @@ 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
|
-
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.Field = void 0;
|
|
22
|
+
const decorators_js_1 = require("lit/decorators.js");
|
|
23
|
+
const lit_1 = require("lit");
|
|
24
|
+
const task_1 = require("@lit/task");
|
|
21
25
|
/**
|
|
22
26
|
* Base class for all fields.
|
|
23
27
|
*/
|
|
24
|
-
|
|
28
|
+
class Field extends lit_1.LitElement {
|
|
25
29
|
constructor() {
|
|
26
30
|
super(...arguments);
|
|
27
31
|
/**
|
|
@@ -45,6 +49,7 @@ export class Field extends LitElement {
|
|
|
45
49
|
/**
|
|
46
50
|
* Provides the value of the field.
|
|
47
51
|
*/
|
|
52
|
+
this.defaultValueProvider = undefined;
|
|
48
53
|
this.valueProvider = undefined;
|
|
49
54
|
this.validationErrorsProvider = undefined;
|
|
50
55
|
this.ownersProvider = () => __awaiter(this, void 0, void 0, function* () { return []; });
|
|
@@ -55,82 +60,102 @@ export class Field extends LitElement {
|
|
|
55
60
|
this.readonly = false;
|
|
56
61
|
this.displayMetadata = false;
|
|
57
62
|
this.selectedLanguage = undefined;
|
|
63
|
+
this._asyncTask = new task_1.Task(this, {
|
|
64
|
+
task: () => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return this.validationErrorsProvider ? yield this.validationErrorsProvider() : [];
|
|
66
|
+
}),
|
|
67
|
+
args: () => [],
|
|
68
|
+
});
|
|
58
69
|
}
|
|
59
70
|
language() {
|
|
60
71
|
var _a, _b;
|
|
61
72
|
return (_b = (this.translate ? (_a = this.selectedLanguage) !== null && _a !== void 0 ? _a : this.defaultLanguage : this.defaultLanguage)) !== null && _b !== void 0 ? _b : 'en';
|
|
62
73
|
}
|
|
74
|
+
render() {
|
|
75
|
+
return this.validationErrorsProvider
|
|
76
|
+
? this._asyncTask.render({
|
|
77
|
+
pending: () => this.renderSync({ validationErrors: [] }),
|
|
78
|
+
complete: (validationErrors) => this.renderSync({ validationErrors }),
|
|
79
|
+
error: () => this.renderSync({ validationErrors: [] }),
|
|
80
|
+
})
|
|
81
|
+
: this.renderSync({ validationErrors: [] });
|
|
82
|
+
}
|
|
63
83
|
}
|
|
84
|
+
exports.Field = Field;
|
|
64
85
|
__decorate([
|
|
65
|
-
property(),
|
|
86
|
+
(0, decorators_js_1.property)(),
|
|
66
87
|
__metadata("design:type", String)
|
|
67
88
|
], Field.prototype, "label", void 0);
|
|
68
89
|
__decorate([
|
|
69
|
-
property(),
|
|
90
|
+
(0, decorators_js_1.property)(),
|
|
70
91
|
__metadata("design:type", Object)
|
|
71
92
|
], Field.prototype, "displayedLabels", void 0);
|
|
72
93
|
__decorate([
|
|
73
|
-
property(),
|
|
94
|
+
(0, decorators_js_1.property)(),
|
|
74
95
|
__metadata("design:type", Object)
|
|
75
96
|
], Field.prototype, "styleOptions", void 0);
|
|
76
97
|
__decorate([
|
|
77
|
-
property(),
|
|
98
|
+
(0, decorators_js_1.property)(),
|
|
78
99
|
__metadata("design:type", Object)
|
|
79
100
|
], Field.prototype, "translate", void 0);
|
|
80
101
|
__decorate([
|
|
81
|
-
property(),
|
|
102
|
+
(0, decorators_js_1.property)(),
|
|
82
103
|
__metadata("design:type", Object)
|
|
83
104
|
], Field.prototype, "defaultLanguage", void 0);
|
|
84
105
|
__decorate([
|
|
85
|
-
property(),
|
|
106
|
+
(0, decorators_js_1.property)(),
|
|
86
107
|
__metadata("design:type", Object)
|
|
87
108
|
], Field.prototype, "languages", void 0);
|
|
88
109
|
__decorate([
|
|
89
|
-
property(),
|
|
110
|
+
(0, decorators_js_1.property)(),
|
|
90
111
|
__metadata("design:type", Function)
|
|
91
112
|
], Field.prototype, "translationProvider", void 0);
|
|
92
113
|
__decorate([
|
|
93
|
-
property(),
|
|
114
|
+
(0, decorators_js_1.property)(),
|
|
115
|
+
__metadata("design:type", Function)
|
|
116
|
+
], Field.prototype, "defaultValueProvider", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, decorators_js_1.property)(),
|
|
94
119
|
__metadata("design:type", Function)
|
|
95
120
|
], Field.prototype, "valueProvider", void 0);
|
|
96
121
|
__decorate([
|
|
97
|
-
property(),
|
|
122
|
+
(0, decorators_js_1.property)(),
|
|
98
123
|
__metadata("design:type", Function)
|
|
99
124
|
], Field.prototype, "validationErrorsProvider", void 0);
|
|
100
125
|
__decorate([
|
|
101
|
-
property(),
|
|
126
|
+
(0, decorators_js_1.property)(),
|
|
102
127
|
__metadata("design:type", Function)
|
|
103
128
|
], Field.prototype, "ownersProvider", void 0);
|
|
104
129
|
__decorate([
|
|
105
|
-
property(),
|
|
130
|
+
(0, decorators_js_1.property)(),
|
|
106
131
|
__metadata("design:type", Function)
|
|
107
132
|
], Field.prototype, "metadataProvider", void 0);
|
|
108
133
|
__decorate([
|
|
109
|
-
property(),
|
|
134
|
+
(0, decorators_js_1.property)(),
|
|
110
135
|
__metadata("design:type", Function)
|
|
111
136
|
], Field.prototype, "handleValueChanged", void 0);
|
|
112
137
|
__decorate([
|
|
113
|
-
property(),
|
|
138
|
+
(0, decorators_js_1.property)(),
|
|
114
139
|
__metadata("design:type", Function)
|
|
115
140
|
], Field.prototype, "handleMetadataChanged", void 0);
|
|
116
141
|
__decorate([
|
|
117
|
-
property(),
|
|
142
|
+
(0, decorators_js_1.property)(),
|
|
118
143
|
__metadata("design:type", Object)
|
|
119
144
|
], Field.prototype, "visible", void 0);
|
|
120
145
|
__decorate([
|
|
121
|
-
property(),
|
|
146
|
+
(0, decorators_js_1.property)(),
|
|
122
147
|
__metadata("design:type", Object)
|
|
123
148
|
], Field.prototype, "readonly", void 0);
|
|
124
149
|
__decorate([
|
|
125
|
-
property(),
|
|
150
|
+
(0, decorators_js_1.property)(),
|
|
126
151
|
__metadata("design:type", Object)
|
|
127
152
|
], Field.prototype, "displayMetadata", void 0);
|
|
128
153
|
__decorate([
|
|
129
|
-
state(),
|
|
154
|
+
(0, decorators_js_1.state)(),
|
|
130
155
|
__metadata("design:type", String)
|
|
131
156
|
], Field.prototype, "selectedLanguage", void 0);
|
|
132
157
|
__decorate([
|
|
133
|
-
state(),
|
|
158
|
+
(0, decorators_js_1.state)(),
|
|
134
159
|
__metadata("design:type", String)
|
|
135
160
|
], Field.prototype, "selectedRevision", void 0);
|
|
136
161
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../../tmp/components/common/field.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../../tmp/components/common/field.ts"],"names":[],"mappings":"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","sourcesContent":["import { property, state } from 'lit/decorators.js'\nimport { LitElement, TemplateResult } from 'lit'\nimport { FieldMetadata, FieldValue, Labels } from '../model'\nimport { Suggestion, VersionedData } from '../../generic'\nimport { Task } from '@lit/task'\n\n/**\n * Base class for all fields.\n */\nexport abstract class Field extends LitElement {\n\t/**\n\t * The label of the field. This is a unique per form property that is used to create data in the formValuesContainer.\n\t */\n\t@property() label: string\n\n\t/**\n\t * The labels of the field. These are the labels that will be displayed in the UI.\n\t * Several labels can be displayed at once\n\t */\n\t@property() displayedLabels: Labels = {}\n\n\t/**\n\t * Extra styles applied to the field.\n\t */\n\t@property() styleOptions: { [key: string]: unknown }\n\n\t/**\n\t * Translate labels and options\n\t */\n\t@property() translate = true\n\t/**\n\t * Iso code of the default language\n\t */\n\t@property() defaultLanguage = 'en'\n\n\t/**\n\t * Iso code and names of the supported languages\n\t */\n\t@property() languages: { [iso: string]: string } = {}\n\n\t@property() translationProvider: (language: string, text: string) => string = (language, text) => text\n\n\t/**\n\t * Provides the value of the field.\n\t */\n\t@property() defaultValueProvider?: () => FieldValue = undefined\n\t@property() valueProvider?: () => VersionedData<FieldValue> = undefined\n\t@property() validationErrorsProvider?: () => Promise<[FieldMetadata, string][]> = undefined\n\t@property() ownersProvider: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]> = async () => []\n\t@property() metadataProvider?: (id: string, revisions: (string | null)[]) => VersionedData<FieldMetadata> = undefined\n\t@property() handleValueChanged?: (label: string, language: string, value?: FieldValue, id?: string) => string | undefined = undefined\n\t@property() handleMetadataChanged?: (metadata: FieldMetadata, id?: string) => string | undefined = undefined\n\n\t@property() public visible = true\n\t@property() readonly = false\n\t@property() displayMetadata = false\n\n\t@state() selectedLanguage?: string = undefined\n\t@state() selectedRevision?: string\n\n\t_asyncTask = new Task(this, {\n\t\ttask: async () => {\n\t\t\treturn this.validationErrorsProvider ? await this.validationErrorsProvider() : []\n\t\t},\n\t\targs: () => [],\n\t})\n\n\tlanguage(): string {\n\t\treturn (this.translate ? this.selectedLanguage ?? this.defaultLanguage : this.defaultLanguage) ?? 'en'\n\t}\n\n\trender() {\n\t\treturn this.validationErrorsProvider\n\t\t\t? this._asyncTask.render({\n\t\t\t\t\tpending: () => this.renderSync({ validationErrors: [] }),\n\t\t\t\t\tcomplete: (validationErrors: [FieldMetadata, string][]) => this.renderSync({ validationErrors }),\n\t\t\t\t\terror: () => this.renderSync({ validationErrors: [] }),\n\t\t\t })\n\t\t\t: this.renderSync({ validationErrors: [] })\n\t}\n\n\tabstract renderSync({}: { validationErrors: [FieldMetadata, string][] }): TemplateResult | TemplateResult[] | undefined\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("./field"), exports);
|
|
2
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/common/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB","sourcesContent":["export * from './field'\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { FieldMetadata, FieldValue } from '../model';
|
|
3
3
|
import { Suggestion, Version } from '../../generic';
|
|
4
|
-
import { CustomEventDetail } from 'app-datepicker/dist/typings';
|
|
4
|
+
import { CustomEventDetail } from '@icure/motss-app-datepicker/dist/typings.js';
|
|
5
5
|
export declare class MetadataButtonBar extends LitElement {
|
|
6
6
|
valueId: string;
|
|
7
7
|
metadata: FieldMetadata;
|
|
@@ -16,6 +16,7 @@ export declare class MetadataButtonBar extends LitElement {
|
|
|
16
16
|
displayedLabels: {
|
|
17
17
|
[iso: string]: string;
|
|
18
18
|
};
|
|
19
|
+
handleReset?: () => void | undefined;
|
|
19
20
|
handleMetadataChanged?: (metadata: FieldMetadata, id?: string) => string | undefined;
|
|
20
21
|
handleLanguageSelected?: (iso?: string) => void;
|
|
21
22
|
handleRevisionSelected?: (rev?: string | null) => void;
|