@icure/form 1.1.14 → 1.1.16
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/@lit-labs-ssr-dom-shim-npm-1.2.0-6bda8c35cb-704621c28d.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.0.4-4836436301-368d788d9e.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-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/app-datepicker-npm-6.0.0-rc.33-f74d593ddf-6490949c45.zip +0 -0
- package/.yarn/cache/argparse-npm-2.0.1-faff7999e6-83644b5649.zip +0 -0
- package/.yarn/cache/blocking-elements-npm-0.1.1-423f51c76e-9a34084405.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/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.0.6-bfca4f9870-4f73cd1c0d.zip +0 -0
- package/.yarn/cache/lit-html-npm-2.8.0-82f88d6ebf-2d70df0724.zip +0 -0
- package/.yarn/cache/lit-html-npm-3.1.4-58e56c5010-428593679c.zip +0 -0
- package/.yarn/cache/lit-npm-2.8.0-92bb1333a4-2480e733f7.zip +0 -0
- package/.yarn/cache/lit-npm-3.1.4-b7dcc2d5a3-c6ffa5580f.zip +0 -0
- package/.yarn/cache/lit-ntml-npm-3.0.6-98ebc6c1ac-2917c778d9.zip +0 -0
- package/.yarn/cache/lodash-es-npm-4.17.21-b45832dfce-05cbffad6e.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/nodemod-npm-3.0.6-844d650911-47ffe619b3.zip +0 -0
- package/.yarn/cache/normalize-diacritics-npm-3.0.12-93e2346015-5ddc2cfaf8.zip +0 -0
- package/.yarn/cache/orderedmap-npm-2.1.1-64b8a0684f-082cf970b0.zip +0 -0
- package/.yarn/cache/parse5-npm-6.0.1-70a35a494a-7d569a176c.zip +0 -0
- package/.yarn/cache/prosemirror-commands-npm-1.5.2-27f8f3fee9-ff65063a8c.zip +0 -0
- package/.yarn/cache/prosemirror-history-npm-1.3.2-cc128c8ee6-b85fe6378a.zip +0 -0
- package/.yarn/cache/prosemirror-keymap-npm-1.2.2-efb8276b00-85fe4fc303.zip +0 -0
- package/.yarn/cache/prosemirror-markdown-npm-1.12.0-28e990f443-d7607ee1a6.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.19.4-4fd32211c8-12c277ed30.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.22.2-9238026de4-f4004a4ebe.zip +0 -0
- package/.yarn/cache/prosemirror-schema-basic-npm-1.2.2-def7bf2ec7-1f93f8678c.zip +0 -0
- package/.yarn/cache/prosemirror-schema-list-npm-1.3.0-23c1830a7e-03654e37c8.zip +0 -0
- package/.yarn/cache/prosemirror-state-npm-1.4.3-d6540e44ad-28857d935c.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.8.0-ea3ca0411f-6d16ca4f95.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.9.0-fd256f82f0-c2d63c1fb0.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.32.7-63c3e4b182-40c9038a52.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.33.9-dd77e3e48f-d3bd6cef56.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/tslib-npm-2.6.3-0fd136b3be-74fce0e100.zip +0 -0
- package/.yarn/cache/uc.micro-npm-2.1.0-c45282c865-3719735824.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.2-786d525c4e-538c5cb7f2.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/components/common/field-with-options.d.ts +1 -1
- package/components/common/field-with-options.js.map +1 -1
- package/components/common/field.d.ts +3 -1
- package/components/common/field.js +18 -8
- package/components/common/field.js.map +1 -1
- package/components/common/utils.js.map +1 -1
- package/components/icure-button-group/index.js +8 -2
- package/components/icure-button-group/index.js.map +1 -1
- package/components/icure-date-picker/index.js +11 -4
- package/components/icure-date-picker/index.js.map +1 -1
- package/components/icure-dropdown-field/index.d.ts +3 -1
- package/components/icure-dropdown-field/index.js +42 -9
- package/components/icure-dropdown-field/index.js.map +1 -1
- package/components/icure-form/fields/button-group/checkbox.js +4 -3
- package/components/icure-form/fields/button-group/checkbox.js.map +1 -1
- package/components/icure-form/fields/button-group/radio-button.js +5 -4
- package/components/icure-form/fields/button-group/radio-button.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-picker.js +4 -3
- package/components/icure-form/fields/date-picker/date-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-time-picker.js +4 -3
- package/components/icure-form/fields/date-picker/date-time-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/time-picker.js +4 -3
- package/components/icure-form/fields/date-picker/time-picker.js.map +1 -1
- package/components/icure-form/fields/dropdown/dropdown-field.d.ts +2 -4
- package/components/icure-form/fields/dropdown/dropdown-field.js +6 -5
- package/components/icure-form/fields/dropdown/dropdown-field.js.map +1 -1
- package/components/icure-form/fields/items-list-field/items-list-field.js +4 -4
- package/components/icure-form/fields/items-list-field/items-list-field.js.map +1 -1
- package/components/icure-form/fields/label/label.js +1 -1
- package/components/icure-form/fields/label/label.js.map +1 -1
- package/components/icure-form/fields/measure-field/measure-field.js +4 -3
- package/components/icure-form/fields/measure-field/measure-field.js.map +1 -1
- package/components/icure-form/fields/number-field/number-field.js +4 -3
- package/components/icure-form/fields/number-field/number-field.js.map +1 -1
- package/components/icure-form/fields/text-field/text-field.d.ts +1 -1
- package/components/icure-form/fields/text-field/text-field.js +5 -4
- package/components/icure-form/fields/text-field/text-field.js.map +1 -1
- package/components/icure-form/fields/token-field/token-field.js +4 -4
- package/components/icure-form/fields/token-field/token-field.js.map +1 -1
- package/components/icure-form/fields/utils/index.d.ts +4 -6
- package/components/icure-form/fields/utils/index.js +1 -1
- package/components/icure-form/fields/utils/index.js.map +1 -1
- package/components/icure-form/index.d.ts +8 -8
- package/components/icure-form/index.js +17 -13
- package/components/icure-form/index.js.map +1 -1
- package/components/icure-form/renderer/form/form-selection-button.js +1 -1
- package/components/icure-form/renderer/form/form-selection-button.js.map +1 -1
- package/components/icure-form/renderer/form/form.js +67 -58
- package/components/icure-form/renderer/form/form.js.map +1 -1
- package/components/icure-form/renderer/index.d.ts +4 -6
- package/components/icure-form/renderer/index.js.map +1 -1
- package/components/icure-label/index.js +6 -1
- package/components/icure-label/index.js.map +1 -1
- package/components/icure-text-field/index.d.ts +7 -9
- package/components/icure-text-field/index.js +118 -51
- package/components/icure-text-field/index.js.map +1 -1
- package/components/icure-text-field/plugin/caret-fix-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/mask-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/regexp-plugin.js.map +1 -1
- package/components/icure-text-field/prosemirror-commands.d.ts +2 -2
- package/components/icure-text-field/prosemirror-commands.js.map +1 -1
- package/components/icure-text-field/prosemirror-utils.js.map +1 -1
- package/components/icure-text-field/schema/common-marks.js.map +1 -1
- package/components/icure-text-field/schema/measure-schema.js.map +1 -1
- package/components/icure-text-field/selection-companion.js.map +1 -1
- package/components/icure-text-field/suggestion-palette.js.map +1 -1
- package/components/model/index.d.ts +69 -137
- package/components/model/index.js +30 -103
- package/components/model/index.js.map +1 -1
- package/components/themes/icure-blue/index.d.ts +1 -0
- package/components/themes/icure-blue/index.js +321 -0
- package/components/themes/icure-blue/index.js.map +1 -0
- package/conversion/ckmeans-grouping.js.map +1 -1
- package/conversion/ckmeans.js.map +1 -1
- package/conversion/icure-convert.js.map +1 -1
- package/generic/model.d.ts +45 -1
- package/generic/model.js.map +1 -1
- package/icure/form-values-container.d.ts +42 -8
- package/icure/form-values-container.js +99 -52
- package/icure/form-values-container.js.map +1 -1
- package/icure/icure-utils.d.ts +19 -0
- package/icure/icure-utils.js +117 -0
- package/icure/icure-utils.js.map +1 -0
- package/icure/model.d.ts +1 -1
- package/icure/model.js.map +1 -1
- package/package.json +5 -7
- package/utils/code-utils.d.ts +3 -10
- package/utils/code-utils.js +3 -9
- package/utils/code-utils.js.map +1 -1
- package/utils/dates.d.ts +6 -0
- package/utils/dates.js +58 -0
- package/utils/dates.js.map +1 -0
- package/utils/fields-values-provider.d.ts +2 -1
- package/utils/fields-values-provider.js +11 -6
- package/utils/fields-values-provider.js.map +1 -1
- package/utils/form-value-container.js.map +1 -1
- package/utils/icure-utils.js.map +1 -1
- package/utils/interpreter.js +1 -2
- package/utils/interpreter.js.map +1 -1
- package/utils/languages.d.ts +1 -5
- package/utils/languages.js.map +1 -1
- package/utils/markdown.d.ts +2 -1
- package/utils/markdown.js +5 -1
- package/utils/markdown.js.map +1 -1
- package/utils/no-lodash.d.ts +3 -1
- package/utils/no-lodash.js +3 -1
- package/utils/no-lodash.js.map +1 -1
- package/utils/primitive.d.ts +0 -3
- package/utils/primitive.js +4 -59
- package/utils/primitive.js.map +1 -1
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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Field } from './field';
|
|
2
2
|
import { Code } from '../model';
|
|
3
3
|
export declare class FieldWithOptionsMixinInterface extends Field {
|
|
4
|
-
optionsProvider: (language: string,
|
|
4
|
+
optionsProvider: (language: string, terms?: string[]) => Promise<Code[]>;
|
|
5
5
|
displayedOptions: Code[];
|
|
6
6
|
}
|
|
7
7
|
type Constructor<T extends Field> = new (...args: any[]) => T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-with-options.js","sourceRoot":"","sources":["../../../tmp/components/common/field-with-options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,mCAA+B;AAG/B,qDAAmD;AAS5C,MAAM,qBAAqB,GAAG,CAA+B,UAAa,EAAE,EAAE;IACpF,MAAM,0BAA2B,SAAQ,UAAU;QAAnD;;YACa,oBAAe,
|
|
1
|
+
{"version":3,"file":"field-with-options.js","sourceRoot":"","sources":["../../../tmp/components/common/field-with-options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,mCAA+B;AAG/B,qDAAmD;AAS5C,MAAM,qBAAqB,GAAG,CAA+B,UAAa,EAAE,EAAE;IACpF,MAAM,0BAA2B,SAAQ,UAAU;QAAnD;;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 class FieldWithOptionsMixinInterface extends Field {\n\toptionsProvider: (language: string, terms?: string[]) => Promise<Code[]>\n\tdisplayedOptions: Code[]\n}\n\ntype Constructor<T extends Field> = new (...args: any[]) => T\n\nexport const FieldWithOptionsMixin = <T extends Constructor<Field>>(superClass: T) => {\n\tclass 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"]}
|
|
@@ -31,16 +31,18 @@ export declare class Field extends LitElement {
|
|
|
31
31
|
/**
|
|
32
32
|
* Iso code of the default language
|
|
33
33
|
*/
|
|
34
|
-
displayedLanguage?: string;
|
|
35
34
|
translationProvider: (language: string, text: string) => string;
|
|
36
35
|
/**
|
|
37
36
|
* Provides the value of the field.
|
|
38
37
|
*/
|
|
39
38
|
valueProvider?: () => VersionedData<FieldValue>;
|
|
39
|
+
validationErrorsProvider?: () => string[];
|
|
40
40
|
metadataProvider?: (id: string, revisions: (string | null)[]) => VersionedData<FieldMetadata>;
|
|
41
41
|
handleValueChanged?: (label: string, language: string, value?: FieldValue, id?: string) => string | undefined;
|
|
42
42
|
handleMetadataChanged?: (label: string, metadata: FieldMetadata, id?: string) => string | undefined;
|
|
43
43
|
visible: boolean;
|
|
44
44
|
readonly: boolean;
|
|
45
|
+
displayMetadata: boolean;
|
|
46
|
+
displayedLanguage?: string;
|
|
45
47
|
language(): string;
|
|
46
48
|
}
|
|
@@ -34,23 +34,26 @@ class Field extends lit_1.LitElement {
|
|
|
34
34
|
/**
|
|
35
35
|
* Iso code of the default language
|
|
36
36
|
*/
|
|
37
|
-
this.displayedLanguage = this.defaultLanguage;
|
|
38
37
|
this.translationProvider = (language, text) => text;
|
|
39
38
|
/**
|
|
40
39
|
* Provides the value of the field.
|
|
41
40
|
*/
|
|
42
41
|
this.valueProvider = undefined;
|
|
42
|
+
this.validationErrorsProvider = undefined;
|
|
43
43
|
this.metadataProvider = undefined;
|
|
44
44
|
this.handleValueChanged = undefined;
|
|
45
45
|
this.handleMetadataChanged = undefined;
|
|
46
46
|
this.visible = true;
|
|
47
47
|
this.readonly = false;
|
|
48
|
+
this.displayMetadata = false;
|
|
49
|
+
this.displayedLanguage = undefined;
|
|
48
50
|
}
|
|
49
51
|
language() {
|
|
50
|
-
var _a;
|
|
51
|
-
return (
|
|
52
|
+
var _a, _b;
|
|
53
|
+
return (_b = (this.translate ? (_a = this.displayedLanguage) !== null && _a !== void 0 ? _a : this.defaultLanguage : this.defaultLanguage)) !== null && _b !== void 0 ? _b : 'en';
|
|
52
54
|
}
|
|
53
55
|
}
|
|
56
|
+
exports.Field = Field;
|
|
54
57
|
__decorate([
|
|
55
58
|
(0, decorators_js_1.property)(),
|
|
56
59
|
__metadata("design:type", String)
|
|
@@ -71,10 +74,6 @@ __decorate([
|
|
|
71
74
|
(0, decorators_js_1.property)(),
|
|
72
75
|
__metadata("design:type", String)
|
|
73
76
|
], Field.prototype, "defaultLanguage", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, decorators_js_1.property)(),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], Field.prototype, "displayedLanguage", void 0);
|
|
78
77
|
__decorate([
|
|
79
78
|
(0, decorators_js_1.property)(),
|
|
80
79
|
__metadata("design:type", Function)
|
|
@@ -83,6 +82,10 @@ __decorate([
|
|
|
83
82
|
(0, decorators_js_1.property)(),
|
|
84
83
|
__metadata("design:type", Function)
|
|
85
84
|
], Field.prototype, "valueProvider", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, decorators_js_1.property)(),
|
|
87
|
+
__metadata("design:type", Function)
|
|
88
|
+
], Field.prototype, "validationErrorsProvider", void 0);
|
|
86
89
|
__decorate([
|
|
87
90
|
(0, decorators_js_1.property)(),
|
|
88
91
|
__metadata("design:type", Function)
|
|
@@ -103,5 +106,12 @@ __decorate([
|
|
|
103
106
|
(0, decorators_js_1.property)(),
|
|
104
107
|
__metadata("design:type", Object)
|
|
105
108
|
], Field.prototype, "readonly", void 0);
|
|
106
|
-
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, decorators_js_1.property)(),
|
|
111
|
+
__metadata("design:type", Object)
|
|
112
|
+
], Field.prototype, "displayMetadata", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, decorators_js_1.state)(),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], Field.prototype, "displayedLanguage", void 0);
|
|
107
117
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../../tmp/components/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A2F;AAK1F;IAAX,IAAA,wBAAQ,GAAE;;4CAA4D;AAC3D;IAAX,IAAA,wBAAQ,GAAE;;uDAAsD;AACrD;IAAX,IAAA,wBAAQ,GAAE;;+CAA0G;AACzG;IAAX,IAAA,wBAAQ,GAAE;;iDAA0H;AACzH;IAAX,IAAA,wBAAQ,GAAE;;oDAAgH;AAExG;IAAlB,IAAA,wBAAQ,GAAE;;sCAAsB;AACrB;IAAX,IAAA,wBAAQ,GAAE;;uCAAiB;AAChB;IAAX,IAAA,wBAAQ,GAAE;;8CAAwB;AAE1B;IAAR,IAAA,qBAAK,GAAE;;gDAAuC","sourcesContent":["import { property, state } from 'lit/decorators.js'\nimport { LitElement } from 'lit'\nimport { FieldMetadata, FieldValue, Labels } from '../model'\nimport { VersionedData } from '../../generic'\n\n/**\n * Base class for all fields.\n */\nexport 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?: string = 'en'\n\t/**\n\t * Iso code of the default language\n\t */\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() valueProvider?: () => VersionedData<FieldValue> = undefined\n\t@property() validationErrorsProvider?: () => string[] = undefined\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?: (label: string, 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() displayedLanguage?: string = undefined\n\n\tlanguage(): string {\n\t\treturn (this.translate ? this.displayedLanguage ?? this.defaultLanguage : this.defaultLanguage) ?? 'en'\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../tmp/components/common/utils.ts"],"names":[],"mappings":";;;AAAA,6BAA0C;AAGnC,MAAM,SAAS,GAAG,CAAC,KAAY,EAAU,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,MAAM,mCAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA,EAAA,CAAA;AAAjI,QAAA,SAAS,aAAwH;AAE9I,SAAgB,cAAc,CAAC,MAAc,EAAE,QAAgB,EAAE,mBAAgE;IAChI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAA;AACvH,CAAC;AAFD,wCAEC;AAED,SAAgB,aAAa,CAC5B,KAAa,EACb,aAAqB,EACrB,QAAgB,EAChB,sBAAkE,CAAC,QAAgB,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI;IAElG,QAAQ,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../tmp/components/common/utils.ts"],"names":[],"mappings":";;;AAAA,6BAA0C;AAGnC,MAAM,SAAS,GAAG,CAAC,KAAY,EAAU,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,MAAM,mCAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,KAA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A,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,KAAK,0CAAG,QAAQ,CAAC,KAAI,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACrG,CAAC,CAAA;AATW,QAAA,sBAAsB,0BASjC","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { Code, Field, Labels } from '../model'\n\nexport const getLabels = (field: Field): Labels => field.labels ?? (field.shortLabel ? { float: field.shortLabel } : { float: field.label() })\n\nexport function generateLabels(labels: Labels, language: string, translationProvider?: (language: string, text: string) => string): TemplateResult[] {\n\treturn Object.keys(labels).map((position) => generateLabel(labels[position], position, language, translationProvider))\n}\n\nexport function generateLabel(\n\tlabel: string,\n\tlabelPosition: string,\n\tlanguage: string,\n\ttranslationProvider: (language: string, text: string) => string = (language: string, text) => text,\n): TemplateResult {\n\tswitch (labelPosition) {\n\t\tcase 'right':\n\t\tcase 'left':\n\t\t\treturn html` <label class=\"icure-label side above ${labelPosition}\">${translationProvider(language, label)}</label> `\n\t\tdefault:\n\t\t\treturn html` <label class=\"icure-label ${labelPosition}\">${translationProvider(language, label)}</label> `\n\t}\n}\n\nexport const makePromoter = (promotions: string[]) => {\n\tconst middle = promotions.indexOf('*' ?? '')\n\treturn (code: Code): number => {\n\t\tconst index = promotions.indexOf(code.id ?? '')\n\t\treturn index >= 0 ? index - middle : 0\n\t}\n}\n\nexport const defaultCodePromoter = (code: Code): number =>\n\tcode?.label?.en?.toLowerCase() === 'other' ? 2 : code?.label?.en?.toLowerCase() === 'none' ? 1 : code?.label?.en?.toLowerCase() === 'empty' ? -1 : 0\n\nexport const defaultCodesComparator =\n\t(language = 'en', ascending = true, codePromoter: (c: Code) => number = defaultCodePromoter) =>\n\t(a: Code, b: Code): number => {\n\t\tconst aPromoted = codePromoter(a)\n\t\tconst bPromoted = codePromoter(b)\n\t\tif (aPromoted !== bPromoted) {\n\t\t\treturn (aPromoted - bPromoted) * (ascending ? 1 : -1)\n\t\t}\n\t\treturn (a?.label?.[language] || '').localeCompare(b?.label?.[language] || '') * (ascending ? 1 : -1)\n\t}\n"]}
|
|
@@ -858,6 +858,11 @@ app-date-picker {
|
|
|
858
858
|
display: grid;
|
|
859
859
|
}
|
|
860
860
|
|
|
861
|
+
.error {
|
|
862
|
+
color: red;
|
|
863
|
+
font-size: 12px;
|
|
864
|
+
}
|
|
865
|
+
|
|
861
866
|
.icure-text-field > .icure-label, .icure-button-group > .icure-label {
|
|
862
867
|
z-index: 1;
|
|
863
868
|
pointer-events: none;
|
|
@@ -1083,7 +1088,7 @@ class IcureButtonGroup extends (0, field_with_options_1.FieldWithOptionsMixin)(c
|
|
|
1083
1088
|
}
|
|
1084
1089
|
}
|
|
1085
1090
|
render() {
|
|
1086
|
-
var _a, _b, _c, _d;
|
|
1091
|
+
var _a, _b, _c, _d, _e;
|
|
1087
1092
|
if (!this.visible) {
|
|
1088
1093
|
return (0, lit_1.html) ``;
|
|
1089
1094
|
}
|
|
@@ -1120,6 +1125,7 @@ class IcureButtonGroup extends (0, field_with_options_1.FieldWithOptionsMixin)(c
|
|
|
1120
1125
|
</div>`;
|
|
1121
1126
|
})}
|
|
1122
1127
|
</div>
|
|
1128
|
+
<div class="error">${(_e = this.validationErrorsProvider) === null || _e === void 0 ? void 0 : _e.call(this).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>
|
|
1123
1129
|
</div>
|
|
1124
1130
|
`;
|
|
1125
1131
|
}
|
|
@@ -1132,9 +1138,9 @@ class IcureButtonGroup extends (0, field_with_options_1.FieldWithOptionsMixin)(c
|
|
|
1132
1138
|
: '';
|
|
1133
1139
|
}
|
|
1134
1140
|
}
|
|
1141
|
+
exports.IcureButtonGroup = IcureButtonGroup;
|
|
1135
1142
|
__decorate([
|
|
1136
1143
|
(0, decorators_js_1.property)(),
|
|
1137
1144
|
__metadata("design:type", String)
|
|
1138
1145
|
], IcureButtonGroup.prototype, "type", void 0);
|
|
1139
|
-
exports.IcureButtonGroup = IcureButtonGroup;
|
|
1140
1146
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-button-group/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAmE;AACnE,qDAA4C;AAC5C,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,CAAC,iCAAiC,MAAM,CAAC,CAAC,MAAA,MAAA,IAAI,CAAC,gBAAgB,0CAAE,MAAM,mCAAI,CAAC,CAAC,IAAI,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAe,CAAA,CAAC,SAAS;gBAC9H,CAAC,CAAC,EAAE,CAAA;IACN,CAAC;CACD;AAnGA;IAAC,IAAA,wBAAQ,GAAE;;8CAAqC;AADjD,4CAoGC","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\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}\n\n.ProseMirror {\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}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror li {\n position: relative;\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\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}\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\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\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 ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\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-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\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\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\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.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\n.ProseMirror {\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\n.ProseMirror p {\n margin-bottom: 1em;\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: inline-block;\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}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n min-width: 26px;\n display: inline-block;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.tokens-list .ProseMirror li span:after:hover, #editor.styled-tokens-list .ProseMirror li span:after:hover {\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzAwMDAwMCIgZmlsbD0iIzAwMDAwMCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n}\n#editor.tokens-list .ProseMirror li span:after, #editor.styled-tokens-list .ProseMirror li span:after {\n content: \" \";\n min-width: 22px;\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n display: inline-block;\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.extra {\n flex-shrink: 0;\n height: 28px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n padding: 0 8px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n\n.extra > .info {\n color: #809ab4;\n font-size: 12px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: right;\n}\n\n.extra > .info > span {\n font-weight: 700;\n}\n\n.extra .buttons-container {\n display: flex;\n height: 100%;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n width: 0;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation-delay: 0.24s;\n}\n\n.extra:hover .buttons-container .menu-container:hover .btn {\n animation-delay: 0.04s;\n}\n\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n}\n\n.extra.forced .info {\n opacity: 0 !important;\n}\n\n.extra:hover .info {\n opacity: 0 !important;\n z-index: 0 !important;\n}\n\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -22px;\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\n.extra .buttons-container .btn:focus,\n.extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\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\n@keyframes slideIn {\n 0% {\n top: 12px;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.menu {\n display: block;\n position: absolute;\n top: 20px;\n right: 0;\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\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\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\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\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\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: block;\n}\n\n.menu-container .item {\n height: 22px;\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\n.menu-container .item:hover {\n background: #f5f9fd;\n font-weight: 500;\n border-radius: 4px;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\n\nspan.date {\n margin-right: 1px;\n}\n\nspan.time {\n margin-left: 1px;\n}\n\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\n\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\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}\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\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\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\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 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.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn,\n.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\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\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: 30px;\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 max-height: 280px;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: 30px;\n right: 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 left: 0px;\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}\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.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 0 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n align-items: end;\n display: grid;\n position: relative;\n margin: 8px -8px 8px;\n padding: 0 8px 0;\n min-height: 64px;\n background-color: #e7f0fd;\n}\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.icure-form .float-right-btn {\n position: absolute;\n right: 10px;\n cursor: pointer;\n}\n.icure-form .float-right-btn.top {\n top: 6px;\n}\n.icure-form .float-right-btn.bottom {\n bottom: -8px;\n}\n\n.icure-form-field {\n align-items: end;\n display: grid;\n}\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: inline-block;\n height: 1.4em;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n flex-direction: row;\n justify-content: stretch;\n align-items: center;\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 border-radius: 2px;\n padding: 4px 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: red;\n color: #000000;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within {\n 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 .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover {\n 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-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 + 5px);\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}` \nimport { Field } from '../common'\nimport { generateLabels } from '../common/utils'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { FieldWithOptionsMixin } from '../common/field-with-options'\n\nexport class IcureButtonGroup extends FieldWithOptionsMixin(Field) {\n\t@property() type: 'radio' | 'checkbox' = 'radio'\n\n\t//override\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\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\tconst fromValue = valueForLanguage && valueForLanguage.type === 'compound' && valueForLanguage.value ? Object.keys(valueForLanguage.value) : []\n\t\t\treturn [id, fromValue.concat(value?.codes?.map((c) => c.id)?.filter((id) => !fromValue.includes(id)) ?? [])]\n\t\t}\n\t\treturn [undefined, undefined]\n\t}\n\n\tpublic checkboxChange() {\n\t\tif (this.readonly) return\n\t\tif (this.handleValueChanged) {\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tconst inputs = Array.from(this.shadowRoot?.querySelectorAll('input') || []).filter((input) => input.checked)\n\t\t\tconst selectedOptions = this.displayedOptions?.filter((option) => inputs.some((i) => i.id === option.id))\n\t\t\tthis.handleValueChanged?.(\n\t\t\t\tthis.label,\n\t\t\t\tthis.language(),\n\t\t\t\t{\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t[this.language()]: {\n\t\t\t\t\t\t\ttype: 'compound',\n\t\t\t\t\t\t\tvalue: selectedOptions?.reduce(\n\t\t\t\t\t\t\t\t(acc, c) => ({\n\t\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t\t[c.id]: { type: 'boolean', value: true },\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcodes: selectedOptions,\n\t\t\t\t},\n\t\t\t\tvalueId,\n\t\t\t)\n\t\t}\n\t}\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\t\tconst inputValues = this.getValueFromProvider()[1] ?? []\n\n\t\treturn html`\n\t\t\t<div class=\"icure-text-field icure-button-group\">\n\t\t\t\t${this.displayedLabels && this.displayedOptions?.length\n\t\t\t\t\t? generateLabels(\n\t\t\t\t\t\t\tObject.entries(this.displayedLabels ?? {})\n\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t//If we have less than 2 options, we don't need to display the label except if it is different from the first option\n\t\t\t\t\t\t\t\t\t([, l]) => (this.displayedOptions?.length ?? 0) > 1 || (this.displayedOptions?.length && l !== this.displayedOptions[0].label[this.language()]),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}),\n\t\t\t\t\t\t\tthis.language(),\n\t\t\t\t\t\t\tthis.translate ? this.translationProvider : undefined,\n\t\t\t\t\t )\n\t\t\t\t\t: nothing}\n\t\t\t\t<div style=\"${this.generateStyle()}\">\n\t\t\t\t\t${(this.displayedOptions?.length ? this.displayedOptions : [{ id: this.label, label: {} }]).map((x) => {\n\t\t\t\t\t\tconst text = (x.label ?? {})[this.language()] ?? ''\n\t\t\t\t\t\tif (this.readonly) {\n\t\t\t\t\t\t\treturn html`<div>\n\t\t\t\t\t\t\t\t<input class=\"icure-checkbox\" disabled type=\"${this.type}\" id=\"${x.id}\" name=\"${this.label}\" value=\"${text}\" .checked=${inputValues.includes(x.id)} />\n\t\t\t\t\t\t\t\t<label class=\"icure-button-group-label\" for=\"${x.id}\"><span>${text}</span></label>\n\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn html`<div>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass=\"icure-checkbox\"\n\t\t\t\t\t\t\t\ttype=\"${this.type}\"\n\t\t\t\t\t\t\t\tid=\"${x.id}\"\n\t\t\t\t\t\t\t\tname=\"${this.label}\"\n\t\t\t\t\t\t\t\tvalue=\"${text}\"\n\t\t\t\t\t\t\t\t.checked=${inputValues.includes(x.id)}\n\t\t\t\t\t\t\t\t@change=${this.checkboxChange}\n\t\t\t\t\t\t\t/><label class=\"icure-button-group-label\" for=\"${x.id}\"><span>${text}</span></label>\n\t\t\t\t\t\t</div>`\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate generateStyle() {\n\t\treturn this.styleOptions?.span\n\t\t\t? `grid-template-columns: repeat(${this.styleOptions?.span}, 1fr);`\n\t\t\t: this.styleOptions?.rows\n\t\t\t? `grid-template-columns: repeat(${Number((this.displayedOptions?.length ?? 0) / (this.styleOptions?.rows as number))}, 1fr);`\n\t\t\t: ''\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-button-group/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAmE;AACnE,qDAA4C;AAC5C,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAQ,MAAA,IAAI,CAAC,mBAAmB,qDAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAA,EAAA,CAAC;;GAElJ,CAAA;IACF,CAAC;IAEO,aAAa;;QACpB,OAAO,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI;YAC7B,CAAC,CAAC,iCAAiC,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,SAAS;YACnE,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI;gBACzB,CAAC,CAAC,iCAAiC,MAAM,CAAC,CAAC,MAAA,MAAA,IAAI,CAAC,gBAAgB,0CAAE,MAAM,mCAAI,CAAC,CAAC,IAAI,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAe,CAAA,CAAC,SAAS;gBAC9H,CAAC,CAAC,EAAE,CAAA;IACN,CAAC;CACD;AArGD,4CAqGC;AApGY;IAAX,IAAA,wBAAQ,GAAE;;8CAAqC","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\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}\n\n.ProseMirror {\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}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror li {\n position: relative;\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\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}\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\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\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 ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\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-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\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\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\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.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\n.ProseMirror {\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\n.ProseMirror p {\n margin-bottom: 1em;\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: inline-block;\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}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n min-width: 26px;\n display: inline-block;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.tokens-list .ProseMirror li span:after:hover, #editor.styled-tokens-list .ProseMirror li span:after:hover {\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzAwMDAwMCIgZmlsbD0iIzAwMDAwMCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n}\n#editor.tokens-list .ProseMirror li span:after, #editor.styled-tokens-list .ProseMirror li span:after {\n content: \" \";\n min-width: 22px;\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n display: inline-block;\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.extra {\n flex-shrink: 0;\n height: 28px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n padding: 0 8px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n\n.extra > .info {\n color: #809ab4;\n font-size: 12px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: right;\n}\n\n.extra > .info > span {\n font-weight: 700;\n}\n\n.extra .buttons-container {\n display: flex;\n height: 100%;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n width: 0;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation-delay: 0.24s;\n}\n\n.extra:hover .buttons-container .menu-container:hover .btn {\n animation-delay: 0.04s;\n}\n\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n}\n\n.extra.forced .info {\n opacity: 0 !important;\n}\n\n.extra:hover .info {\n opacity: 0 !important;\n z-index: 0 !important;\n}\n\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -22px;\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\n.extra .buttons-container .btn:focus,\n.extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\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\n@keyframes slideIn {\n 0% {\n top: 12px;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.menu {\n display: block;\n position: absolute;\n top: 20px;\n right: 0;\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\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\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\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\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\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: block;\n}\n\n.menu-container .item {\n height: 22px;\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\n.menu-container .item:hover {\n background: #f5f9fd;\n font-weight: 500;\n border-radius: 4px;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\n\nspan.date {\n margin-right: 1px;\n}\n\nspan.time {\n margin-left: 1px;\n}\n\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\n\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\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}\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\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\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\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 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.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn,\n.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\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\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: 30px;\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 max-height: 280px;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: 30px;\n right: 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 left: 0px;\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}\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.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 0 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n align-items: end;\n display: grid;\n position: relative;\n margin: 8px -8px 8px;\n padding: 0 8px 0;\n min-height: 64px;\n background-color: #e7f0fd;\n}\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.icure-form .float-right-btn {\n position: absolute;\n right: 10px;\n cursor: pointer;\n}\n.icure-form .float-right-btn.top {\n top: 6px;\n}\n.icure-form .float-right-btn.bottom {\n bottom: -8px;\n}\n\n.icure-form-field {\n align-items: end;\n display: grid;\n}\n\n.error {\n color: red;\n font-size: 12px;\n}\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: inline-block;\n height: 1.4em;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n flex-direction: row;\n justify-content: stretch;\n align-items: center;\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 border-radius: 2px;\n padding: 4px 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: red;\n color: #000000;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within {\n 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 .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover {\n 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-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 + 5px);\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}` \nimport { Field } from '../common'\nimport { generateLabels } from '../common/utils'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { FieldWithOptionsMixin } from '../common/field-with-options'\n\nexport class IcureButtonGroup extends FieldWithOptionsMixin(Field) {\n\t@property() type: 'radio' | 'checkbox' = 'radio'\n\n\t//override\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\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\tconst fromValue = valueForLanguage && valueForLanguage.type === 'compound' && valueForLanguage.value ? Object.keys(valueForLanguage.value) : []\n\t\t\treturn [id, fromValue.concat(value?.codes?.map((c) => c.id)?.filter((id) => !fromValue.includes(id)) ?? [])]\n\t\t}\n\t\treturn [undefined, undefined]\n\t}\n\n\tpublic checkboxChange() {\n\t\tif (this.readonly) return\n\t\tif (this.handleValueChanged) {\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tconst inputs = Array.from(this.shadowRoot?.querySelectorAll('input') || []).filter((input) => input.checked)\n\t\t\tconst selectedOptions = this.displayedOptions?.filter((option) => inputs.some((i) => i.id === option.id))\n\t\t\tthis.handleValueChanged?.(\n\t\t\t\tthis.label,\n\t\t\t\tthis.language(),\n\t\t\t\t{\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t[this.language()]: {\n\t\t\t\t\t\t\ttype: 'compound',\n\t\t\t\t\t\t\tvalue: selectedOptions?.reduce(\n\t\t\t\t\t\t\t\t(acc, c) => ({\n\t\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t\t[c.id]: { type: 'boolean', value: true },\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcodes: selectedOptions,\n\t\t\t\t},\n\t\t\t\tvalueId,\n\t\t\t)\n\t\t}\n\t}\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\t\tconst inputValues = this.getValueFromProvider()[1] ?? []\n\n\t\treturn html`\n\t\t\t<div class=\"icure-text-field icure-button-group\">\n\t\t\t\t${this.displayedLabels && this.displayedOptions?.length\n\t\t\t\t\t? generateLabels(\n\t\t\t\t\t\t\tObject.entries(this.displayedLabels ?? {})\n\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t//If we have less than 2 options, we don't need to display the label except if it is different from the first option\n\t\t\t\t\t\t\t\t\t([, l]) => (this.displayedOptions?.length ?? 0) > 1 || (this.displayedOptions?.length && l !== this.displayedOptions[0].label[this.language()]),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}),\n\t\t\t\t\t\t\tthis.language(),\n\t\t\t\t\t\t\tthis.translate ? this.translationProvider : undefined,\n\t\t\t\t\t )\n\t\t\t\t\t: nothing}\n\t\t\t\t<div style=\"${this.generateStyle()}\">\n\t\t\t\t\t${(this.displayedOptions?.length ? this.displayedOptions : [{ id: this.label, label: {} }]).map((x) => {\n\t\t\t\t\t\tconst text = (x.label ?? {})[this.language()] ?? ''\n\t\t\t\t\t\tif (this.readonly) {\n\t\t\t\t\t\t\treturn html`<div>\n\t\t\t\t\t\t\t\t<input class=\"icure-checkbox\" disabled type=\"${this.type}\" id=\"${x.id}\" name=\"${this.label}\" value=\"${text}\" .checked=${inputValues.includes(x.id)} />\n\t\t\t\t\t\t\t\t<label class=\"icure-button-group-label\" for=\"${x.id}\"><span>${text}</span></label>\n\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn html`<div>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass=\"icure-checkbox\"\n\t\t\t\t\t\t\t\ttype=\"${this.type}\"\n\t\t\t\t\t\t\t\tid=\"${x.id}\"\n\t\t\t\t\t\t\t\tname=\"${this.label}\"\n\t\t\t\t\t\t\t\tvalue=\"${text}\"\n\t\t\t\t\t\t\t\t.checked=${inputValues.includes(x.id)}\n\t\t\t\t\t\t\t\t@change=${this.checkboxChange}\n\t\t\t\t\t\t\t/><label class=\"icure-button-group-label\" for=\"${x.id}\"><span>${text}</span></label>\n\t\t\t\t\t\t</div>`\n\t\t\t\t\t})}\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\tprivate generateStyle() {\n\t\treturn this.styleOptions?.span\n\t\t\t? `grid-template-columns: repeat(${this.styleOptions?.span}, 1fr);`\n\t\t\t: this.styleOptions?.rows\n\t\t\t? `grid-template-columns: repeat(${Number((this.displayedOptions?.length ?? 0) / (this.styleOptions?.rows as number))}, 1fr);`\n\t\t\t: ''\n\t}\n}\n"]}
|