@icure/form 1.0.8 → 1.0.13
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/package.json +14 -14
- package/{components → src/components}/index.d.ts +0 -0
- package/{components → src/components}/index.js +6 -1
- package/src/components/index.js.map +1 -0
- package/src/components/iqr-form/fields/datePicker.d.ts +10 -0
- package/{components → src/components}/iqr-form/fields/datePicker.js +27 -12
- package/src/components/iqr-form/fields/datePicker.js.map +1 -0
- package/src/components/iqr-form/fields/dateTimePicker.d.ts +10 -0
- package/{components → src/components}/iqr-form/fields/dateTimePicker.js +19 -12
- package/src/components/iqr-form/fields/dateTimePicker.js.map +1 -0
- package/src/components/iqr-form/fields/measureField.d.ts +8 -0
- package/{components → src/components}/iqr-form/fields/measureField.js +14 -12
- package/src/components/iqr-form/fields/measureField.js.map +1 -0
- package/src/components/iqr-form/fields/multipleChoice.d.ts +8 -0
- package/{components → src/components}/iqr-form/fields/multipleChoice.js +14 -12
- package/src/components/iqr-form/fields/multipleChoice.js.map +1 -0
- package/src/components/iqr-form/fields/numberField.d.ts +8 -0
- package/{components → src/components}/iqr-form/fields/numberField.js +14 -12
- package/src/components/iqr-form/fields/numberField.js.map +1 -0
- package/{components → src/components}/iqr-form/fields/textfield.d.ts +0 -0
- package/src/components/iqr-form/fields/textfield.js +142 -0
- package/src/components/iqr-form/fields/textfield.js.map +1 -0
- package/src/components/iqr-form/fields/timePicker.d.ts +10 -0
- package/{components → src/components}/iqr-form/fields/timePicker.js +19 -12
- package/src/components/iqr-form/fields/timePicker.js.map +1 -0
- package/{components → src/components}/iqr-form/index.d.ts +0 -0
- package/src/components/iqr-form/index.js +89 -0
- package/src/components/iqr-form/index.js.map +1 -0
- package/src/components/iqr-form/legacy/Content.d.ts +28 -0
- package/src/components/iqr-form/legacy/Content.js +30 -0
- package/src/components/iqr-form/legacy/Content.js.map +1 -0
- package/src/components/iqr-form/legacy/Data.d.ts +14 -0
- package/src/components/iqr-form/legacy/Data.js +21 -0
- package/src/components/iqr-form/legacy/Data.js.map +1 -0
- package/src/components/iqr-form/legacy/Editor.d.ts +34 -0
- package/src/components/iqr-form/legacy/Editor.js +19 -0
- package/src/components/iqr-form/legacy/Editor.js.map +1 -0
- package/src/components/iqr-form/legacy/FormColumn.d.ts +18 -0
- package/src/components/iqr-form/legacy/FormColumn.js +10 -0
- package/src/components/iqr-form/legacy/FormColumn.js.map +1 -0
- package/src/components/iqr-form/legacy/FormDataOption.d.ts +16 -0
- package/src/components/iqr-form/legacy/FormDataOption.js +21 -0
- package/src/components/iqr-form/legacy/FormDataOption.js.map +1 -0
- package/src/components/iqr-form/legacy/FormLayout.d.ts +25 -0
- package/src/components/iqr-form/legacy/FormLayout.js +10 -0
- package/src/components/iqr-form/legacy/FormLayout.js.map +1 -0
- package/src/components/iqr-form/legacy/FormLayoutData.d.ts +42 -0
- package/src/components/iqr-form/legacy/FormLayoutData.js +10 -0
- package/src/components/iqr-form/legacy/FormLayoutData.js.map +1 -0
- package/src/components/iqr-form/legacy/FormPlanning.d.ts +22 -0
- package/src/components/iqr-form/legacy/FormPlanning.js +21 -0
- package/src/components/iqr-form/legacy/FormPlanning.js.map +1 -0
- package/src/components/iqr-form/legacy/FormSection.d.ts +19 -0
- package/src/components/iqr-form/legacy/FormSection.js +10 -0
- package/src/components/iqr-form/legacy/FormSection.js.map +1 -0
- package/src/components/iqr-form/legacy/Formula.d.ts +27 -0
- package/src/components/iqr-form/legacy/Formula.js +32 -0
- package/src/components/iqr-form/legacy/Formula.js.map +1 -0
- package/src/components/iqr-form/legacy/GuiCode.d.ts +16 -0
- package/src/components/iqr-form/legacy/GuiCode.js +21 -0
- package/src/components/iqr-form/legacy/GuiCode.js.map +1 -0
- package/src/components/iqr-form/legacy/GuiCodeType.d.ts +15 -0
- package/src/components/iqr-form/legacy/GuiCodeType.js +21 -0
- package/src/components/iqr-form/legacy/GuiCodeType.js.map +1 -0
- package/src/components/iqr-form/legacy/Suggest.d.ts +19 -0
- package/src/components/iqr-form/legacy/Suggest.js +21 -0
- package/src/components/iqr-form/legacy/Suggest.js.map +1 -0
- package/src/components/iqr-form/legacy/Tag.d.ts +16 -0
- package/src/components/iqr-form/legacy/Tag.js +21 -0
- package/src/components/iqr-form/legacy/Tag.js.map +1 -0
- package/{components → src/components}/iqr-form/model/index.d.ts +36 -18
- package/{components → src/components}/iqr-form/model/index.js +9 -3
- package/src/components/iqr-form/model/index.js.map +1 -0
- package/{components → src/components}/iqr-form/renderer/cards.d.ts +1 -1
- package/src/components/iqr-form/renderer/cards.js +55 -0
- package/src/components/iqr-form/renderer/cards.js.map +1 -0
- package/{components → src/components}/iqr-form/renderer/form.d.ts +1 -1
- package/src/components/iqr-form/renderer/form.js +93 -0
- package/src/components/iqr-form/renderer/form.js.map +1 -0
- package/src/components/iqr-form/renderer/index.d.ts +6 -0
- package/{components → src/components}/iqr-form/renderer/index.js +1 -0
- package/src/components/iqr-form/renderer/index.js.map +1 -0
- package/src/components/iqr-form/utils.d.ts +5 -0
- package/src/components/iqr-form/utils.js +91 -0
- package/src/components/iqr-form/utils.js.map +1 -0
- package/src/components/iqr-form-loader/fieldsValuesProviders.d.ts +13 -0
- package/src/components/iqr-form-loader/fieldsValuesProviders.js +47 -0
- package/src/components/iqr-form-loader/fieldsValuesProviders.js.map +1 -0
- package/src/components/iqr-form-loader/formValuesContainer.d.ts +33 -0
- package/src/components/iqr-form-loader/formValuesContainer.js +111 -0
- package/src/components/iqr-form-loader/formValuesContainer.js.map +1 -0
- package/src/components/iqr-form-loader/index.d.ts +3 -0
- package/src/components/iqr-form-loader/index.js +20 -0
- package/src/components/iqr-form-loader/index.js.map +1 -0
- package/src/components/iqr-form-loader/models.d.ts +14 -0
- package/src/components/iqr-form-loader/models.js +3 -0
- package/src/components/iqr-form-loader/models.js.map +1 -0
- package/src/components/iqr-text-field/index.d.ts +26 -0
- package/src/components/iqr-text-field/index.js +490 -0
- package/src/components/iqr-text-field/index.js.map +1 -0
- package/src/components/iqr-text-field/plugin/caret-fix-plugin.d.ts +2 -0
- package/{components → src/components}/iqr-text-field/plugin/caret-fix-plugin.js +11 -6
- package/src/components/iqr-text-field/plugin/caret-fix-plugin.js.map +1 -0
- package/src/components/iqr-text-field/plugin/has-content-class-plugin.d.ts +2 -0
- package/{components → src/components}/iqr-text-field/plugin/has-content-class-plugin.js +8 -5
- package/src/components/iqr-text-field/plugin/has-content-class-plugin.js.map +1 -0
- package/src/components/iqr-text-field/plugin/mask-plugin.d.ts +2 -0
- package/{components → src/components}/iqr-text-field/plugin/mask-plugin.js +20 -12
- package/src/components/iqr-text-field/plugin/mask-plugin.js.map +1 -0
- package/src/components/iqr-text-field/plugin/regexp-plugin.d.ts +2 -0
- package/{components → src/components}/iqr-text-field/plugin/regexp-plugin.js +8 -4
- package/src/components/iqr-text-field/plugin/regexp-plugin.js.map +1 -0
- package/src/components/iqr-text-field/prosemirror-commands.d.ts +6 -0
- package/{components → src/components}/iqr-text-field/prosemirror-commands.js +7 -5
- package/src/components/iqr-text-field/prosemirror-commands.js.map +1 -0
- package/{components → src/components}/iqr-text-field/prosemirror-utils.d.ts +1 -1
- package/{components → src/components}/iqr-text-field/prosemirror-utils.js +2 -1
- package/src/components/iqr-text-field/prosemirror-utils.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/common-marks.d.ts +1 -1
- package/src/components/iqr-text-field/schema/common-marks.js +94 -0
- package/src/components/iqr-text-field/schema/common-marks.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/date-time-schema.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/schema/date-time-schema.js +14 -13
- package/src/components/iqr-text-field/schema/date-time-schema.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/decimal-schema.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/schema/decimal-schema.js +5 -4
- package/src/components/iqr-text-field/schema/decimal-schema.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/index.d.ts +6 -6
- package/src/components/iqr-text-field/schema/index.js +26 -0
- package/src/components/iqr-text-field/schema/index.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/markdown-schema.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/schema/markdown-schema.js +67 -33
- package/src/components/iqr-text-field/schema/markdown-schema.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/measure-schema.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/schema/measure-schema.js +6 -5
- package/src/components/iqr-text-field/schema/measure-schema.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/token-schema.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/schema/token-schema.js +12 -8
- package/src/components/iqr-text-field/schema/token-schema.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/utils.d.ts +1 -1
- package/{components → src/components}/iqr-text-field/schema/utils.js +3 -2
- package/src/components/iqr-text-field/schema/utils.js.map +1 -0
- package/{components → src/components}/iqr-text-field/selection-companion.d.ts +2 -2
- package/{components → src/components}/iqr-text-field/selection-companion.js +14 -12
- package/src/components/iqr-text-field/selection-companion.js.map +1 -0
- package/src/components/iqr-text-field/styles/paths.d.ts +5 -0
- package/src/components/iqr-text-field/styles/paths.js +37 -0
- package/src/components/iqr-text-field/styles/paths.js.map +1 -0
- package/{components → src/components}/iqr-text-field/suggestion-palette.d.ts +13 -15
- package/{components → src/components}/iqr-text-field/suggestion-palette.js +52 -22
- package/src/components/iqr-text-field/suggestion-palette.js.map +1 -0
- package/{index.d.ts → src/index.d.ts} +0 -0
- package/{index.js → src/index.js} +6 -1
- package/src/index.js.map +1 -0
- package/src/utils/icure-utils.d.ts +19 -0
- package/src/utils/icure-utils.js +106 -0
- package/src/utils/icure-utils.js.map +1 -0
- package/src/utils/languages.d.ts +8 -0
- package/src/utils/languages.js +15 -0
- package/src/utils/languages.js.map +1 -0
- package/src/utils/no-lodash.d.ts +5 -0
- package/src/utils/no-lodash.js +25 -0
- package/src/utils/no-lodash.js.map +1 -0
- package/tmp/components/index.d.ts +2 -0
- package/tmp/components/index.js +19 -0
- package/tmp/components/index.js.map +1 -0
- package/tmp/components/iqr-form/fields/datePicker.d.ts +10 -0
- package/tmp/components/iqr-form/fields/datePicker.js +57 -0
- package/tmp/components/iqr-form/fields/datePicker.js.map +1 -0
- package/tmp/components/iqr-form/fields/dateTimePicker.d.ts +10 -0
- package/tmp/components/iqr-form/fields/dateTimePicker.js +49 -0
- package/tmp/components/iqr-form/fields/dateTimePicker.js.map +1 -0
- package/tmp/components/iqr-form/fields/measureField.d.ts +8 -0
- package/tmp/components/iqr-form/fields/measureField.js +44 -0
- package/tmp/components/iqr-form/fields/measureField.js.map +1 -0
- package/tmp/components/iqr-form/fields/multipleChoice.d.ts +8 -0
- package/tmp/components/iqr-form/fields/multipleChoice.js +44 -0
- package/tmp/components/iqr-form/fields/multipleChoice.js.map +1 -0
- package/tmp/components/iqr-form/fields/numberField.d.ts +8 -0
- package/tmp/components/iqr-form/fields/numberField.js +44 -0
- package/tmp/components/iqr-form/fields/numberField.js.map +1 -0
- package/tmp/components/iqr-form/fields/textfield.d.ts +1 -0
- package/tmp/components/iqr-form/fields/textfield.js +142 -0
- package/tmp/components/iqr-form/fields/textfield.js.map +1 -0
- package/tmp/components/iqr-form/fields/timePicker.d.ts +10 -0
- package/tmp/components/iqr-form/fields/timePicker.js +49 -0
- package/tmp/components/iqr-form/fields/timePicker.js.map +1 -0
- package/tmp/components/iqr-form/index.d.ts +7 -0
- package/{components → tmp/components}/iqr-form/index.js +28 -22
- package/tmp/components/iqr-form/index.js.map +1 -0
- package/tmp/components/iqr-form/legacy/Content.d.ts +28 -0
- package/tmp/components/iqr-form/legacy/Content.js +30 -0
- package/tmp/components/iqr-form/legacy/Content.js.map +1 -0
- package/tmp/components/iqr-form/legacy/Data.d.ts +14 -0
- package/tmp/components/iqr-form/legacy/Data.js +21 -0
- package/tmp/components/iqr-form/legacy/Data.js.map +1 -0
- package/tmp/components/iqr-form/legacy/Editor.d.ts +34 -0
- package/tmp/components/iqr-form/legacy/Editor.js +19 -0
- package/tmp/components/iqr-form/legacy/Editor.js.map +1 -0
- package/tmp/components/iqr-form/legacy/FormColumn.d.ts +18 -0
- package/tmp/components/iqr-form/legacy/FormColumn.js +10 -0
- package/tmp/components/iqr-form/legacy/FormColumn.js.map +1 -0
- package/tmp/components/iqr-form/legacy/FormDataOption.d.ts +16 -0
- package/tmp/components/iqr-form/legacy/FormDataOption.js +21 -0
- package/tmp/components/iqr-form/legacy/FormDataOption.js.map +1 -0
- package/tmp/components/iqr-form/legacy/FormLayout.d.ts +25 -0
- package/tmp/components/iqr-form/legacy/FormLayout.js +10 -0
- package/tmp/components/iqr-form/legacy/FormLayout.js.map +1 -0
- package/tmp/components/iqr-form/legacy/FormLayoutData.d.ts +42 -0
- package/tmp/components/iqr-form/legacy/FormLayoutData.js +10 -0
- package/tmp/components/iqr-form/legacy/FormLayoutData.js.map +1 -0
- package/tmp/components/iqr-form/legacy/FormPlanning.d.ts +22 -0
- package/tmp/components/iqr-form/legacy/FormPlanning.js +21 -0
- package/tmp/components/iqr-form/legacy/FormPlanning.js.map +1 -0
- package/tmp/components/iqr-form/legacy/FormSection.d.ts +19 -0
- package/tmp/components/iqr-form/legacy/FormSection.js +10 -0
- package/tmp/components/iqr-form/legacy/FormSection.js.map +1 -0
- package/tmp/components/iqr-form/legacy/Formula.d.ts +27 -0
- package/tmp/components/iqr-form/legacy/Formula.js +32 -0
- package/tmp/components/iqr-form/legacy/Formula.js.map +1 -0
- package/tmp/components/iqr-form/legacy/GuiCode.d.ts +16 -0
- package/tmp/components/iqr-form/legacy/GuiCode.js +21 -0
- package/tmp/components/iqr-form/legacy/GuiCode.js.map +1 -0
- package/tmp/components/iqr-form/legacy/GuiCodeType.d.ts +15 -0
- package/tmp/components/iqr-form/legacy/GuiCodeType.js +21 -0
- package/tmp/components/iqr-form/legacy/GuiCodeType.js.map +1 -0
- package/tmp/components/iqr-form/legacy/Suggest.d.ts +19 -0
- package/tmp/components/iqr-form/legacy/Suggest.js +21 -0
- package/tmp/components/iqr-form/legacy/Suggest.js.map +1 -0
- package/tmp/components/iqr-form/legacy/Tag.d.ts +16 -0
- package/tmp/components/iqr-form/legacy/Tag.js +21 -0
- package/tmp/components/iqr-form/legacy/Tag.js.map +1 -0
- package/tmp/components/iqr-form/model/index.d.ts +96 -0
- package/tmp/components/iqr-form/model/index.js +120 -0
- package/tmp/components/iqr-form/model/index.js.map +1 -0
- package/tmp/components/iqr-form/renderer/cards.d.ts +2 -0
- package/tmp/components/iqr-form/renderer/cards.js +55 -0
- package/tmp/components/iqr-form/renderer/cards.js.map +1 -0
- package/tmp/components/iqr-form/renderer/form.d.ts +2 -0
- package/tmp/components/iqr-form/renderer/form.js +93 -0
- package/tmp/components/iqr-form/renderer/form.js.map +1 -0
- package/tmp/components/iqr-form/renderer/index.d.ts +6 -0
- package/tmp/components/iqr-form/renderer/index.js +3 -0
- package/tmp/components/iqr-form/renderer/index.js.map +1 -0
- package/tmp/components/iqr-form/utils.d.ts +5 -0
- package/tmp/components/iqr-form/utils.js +91 -0
- package/tmp/components/iqr-form/utils.js.map +1 -0
- package/tmp/components/iqr-form-loader/fieldsValuesProviders.d.ts +13 -0
- package/tmp/components/iqr-form-loader/fieldsValuesProviders.js +47 -0
- package/tmp/components/iqr-form-loader/fieldsValuesProviders.js.map +1 -0
- package/tmp/components/iqr-form-loader/formValuesContainer.d.ts +33 -0
- package/tmp/components/iqr-form-loader/formValuesContainer.js +111 -0
- package/tmp/components/iqr-form-loader/formValuesContainer.js.map +1 -0
- package/tmp/components/iqr-form-loader/index.d.ts +3 -0
- package/tmp/components/iqr-form-loader/index.js +20 -0
- package/tmp/components/iqr-form-loader/index.js.map +1 -0
- package/tmp/components/iqr-form-loader/models.d.ts +14 -0
- package/tmp/components/iqr-form-loader/models.js +3 -0
- package/tmp/components/iqr-form-loader/models.js.map +1 -0
- package/tmp/components/iqr-text-field/index.d.ts +26 -0
- package/{components → tmp/components}/iqr-text-field/index.js +340 -178
- package/tmp/components/iqr-text-field/index.js.map +1 -0
- package/tmp/components/iqr-text-field/plugin/caret-fix-plugin.d.ts +2 -0
- package/tmp/components/iqr-text-field/plugin/caret-fix-plugin.js +29 -0
- package/tmp/components/iqr-text-field/plugin/caret-fix-plugin.js.map +1 -0
- package/tmp/components/iqr-text-field/plugin/has-content-class-plugin.d.ts +2 -0
- package/tmp/components/iqr-text-field/plugin/has-content-class-plugin.js +22 -0
- package/tmp/components/iqr-text-field/plugin/has-content-class-plugin.js.map +1 -0
- package/tmp/components/iqr-text-field/plugin/mask-plugin.d.ts +2 -0
- package/tmp/components/iqr-text-field/plugin/mask-plugin.js +152 -0
- package/tmp/components/iqr-text-field/plugin/mask-plugin.js.map +1 -0
- package/tmp/components/iqr-text-field/plugin/regexp-plugin.d.ts +2 -0
- package/tmp/components/iqr-text-field/plugin/regexp-plugin.js +51 -0
- package/tmp/components/iqr-text-field/plugin/regexp-plugin.js.map +1 -0
- package/tmp/components/iqr-text-field/prosemirror-commands.d.ts +6 -0
- package/tmp/components/iqr-text-field/prosemirror-commands.js +54 -0
- package/tmp/components/iqr-text-field/prosemirror-commands.js.map +1 -0
- package/tmp/components/iqr-text-field/prosemirror-utils.d.ts +5 -0
- package/tmp/components/iqr-text-field/prosemirror-utils.js +16 -0
- package/tmp/components/iqr-text-field/prosemirror-utils.js.map +1 -0
- package/tmp/components/iqr-text-field/schema/common-marks.d.ts +10 -0
- package/tmp/components/iqr-text-field/schema/common-marks.js +94 -0
- package/tmp/components/iqr-text-field/schema/common-marks.js.map +1 -0
- package/tmp/components/iqr-text-field/schema/date-time-schema.d.ts +7 -0
- package/tmp/components/iqr-text-field/schema/date-time-schema.js +89 -0
- package/tmp/components/iqr-text-field/schema/date-time-schema.js.map +1 -0
- package/tmp/components/iqr-text-field/schema/decimal-schema.d.ts +3 -0
- package/tmp/components/iqr-text-field/schema/decimal-schema.js +28 -0
- package/tmp/components/iqr-text-field/schema/decimal-schema.js.map +1 -0
- package/tmp/components/iqr-text-field/schema/index.d.ts +11 -0
- package/tmp/components/iqr-text-field/schema/index.js +26 -0
- package/tmp/components/iqr-text-field/schema/index.js.map +1 -0
- package/tmp/components/iqr-text-field/schema/markdown-schema.d.ts +8 -0
- package/tmp/components/iqr-text-field/schema/markdown-schema.js +173 -0
- package/tmp/components/iqr-text-field/schema/markdown-schema.js.map +1 -0
- package/tmp/components/iqr-text-field/schema/measure-schema.d.ts +3 -0
- package/tmp/components/iqr-text-field/schema/measure-schema.js +36 -0
- package/tmp/components/iqr-text-field/schema/measure-schema.js.map +1 -0
- package/tmp/components/iqr-text-field/schema/token-schema.d.ts +6 -0
- package/tmp/components/iqr-text-field/schema/token-schema.js +40 -0
- package/tmp/components/iqr-text-field/schema/token-schema.js.map +1 -0
- package/tmp/components/iqr-text-field/schema/utils.d.ts +11 -0
- package/tmp/components/iqr-text-field/schema/utils.js +12 -0
- package/tmp/components/iqr-text-field/schema/utils.js.map +1 -0
- package/tmp/components/iqr-text-field/selection-companion.d.ts +11 -0
- package/tmp/components/iqr-text-field/selection-companion.js +54 -0
- package/tmp/components/iqr-text-field/selection-companion.js.map +1 -0
- package/tmp/components/iqr-text-field/styles/paths.d.ts +5 -0
- package/tmp/components/iqr-text-field/styles/paths.js +37 -0
- package/tmp/components/iqr-text-field/styles/paths.js.map +1 -0
- package/tmp/components/iqr-text-field/suggestion-palette.d.ts +31 -0
- package/tmp/components/iqr-text-field/suggestion-palette.js +169 -0
- package/tmp/components/iqr-text-field/suggestion-palette.js.map +1 -0
- package/tmp/index.d.ts +1 -0
- package/tmp/index.js +18 -0
- package/tmp/index.js.map +1 -0
- package/tmp/utils/icure-utils.d.ts +19 -0
- package/tmp/utils/icure-utils.js +106 -0
- package/tmp/utils/icure-utils.js.map +1 -0
- package/tmp/utils/languages.d.ts +8 -0
- package/tmp/utils/languages.js +15 -0
- package/tmp/utils/languages.js.map +1 -0
- package/tmp/utils/no-lodash.d.ts +5 -0
- package/tmp/utils/no-lodash.js +25 -0
- package/tmp/utils/no-lodash.js.map +1 -0
- package/components/iqr-form/fields/datePicker.d.ts +0 -8
- package/components/iqr-form/fields/dateTimePicker.d.ts +0 -8
- package/components/iqr-form/fields/measureField.d.ts +0 -8
- package/components/iqr-form/fields/multipleChoice.d.ts +0 -8
- package/components/iqr-form/fields/numberField.d.ts +0 -8
- package/components/iqr-form/fields/textfield.js +0 -86
- package/components/iqr-form/fields/timePicker.d.ts +0 -8
- package/components/iqr-form/renderer/cards.js +0 -44
- package/components/iqr-form/renderer/form.js +0 -45
- package/components/iqr-form/renderer/index.d.ts +0 -3
- package/components/iqr-text-field/index.d.ts +0 -2
- package/components/iqr-text-field/plugin/caret-fix-plugin.d.ts +0 -2
- package/components/iqr-text-field/plugin/has-content-class-plugin.d.ts +0 -2
- package/components/iqr-text-field/plugin/mask-plugin.d.ts +0 -2
- package/components/iqr-text-field/plugin/regexp-plugin.d.ts +0 -2
- package/components/iqr-text-field/prosemirror-commands.d.ts +0 -4
- package/components/iqr-text-field/schema/common-marks.js +0 -90
- package/components/iqr-text-field/schema/index.js +0 -18
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EditorView } from 'prosemirror-view';
|
|
2
|
+
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import { Schema } from 'prosemirror-model';
|
|
4
|
+
export declare type Suggestion = {
|
|
5
|
+
id: string;
|
|
6
|
+
code: string;
|
|
7
|
+
text: string;
|
|
8
|
+
terms: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare class SuggestionPalette {
|
|
11
|
+
private readonly palette;
|
|
12
|
+
private delay;
|
|
13
|
+
private lastTime;
|
|
14
|
+
private suggestionProvider;
|
|
15
|
+
private previousFingerprint?;
|
|
16
|
+
private suggestionStopWordsProvider;
|
|
17
|
+
private currentFocus?;
|
|
18
|
+
private hasFocus;
|
|
19
|
+
private suggestions;
|
|
20
|
+
private schema;
|
|
21
|
+
constructor(schema: Schema, view: EditorView, suggestionProvider: (terms: string[]) => Promise<Suggestion[]>, suggestionStopWordsProvider: () => Set<string>, delay?: () => boolean);
|
|
22
|
+
focusItem(idx?: number): void;
|
|
23
|
+
focus(): boolean;
|
|
24
|
+
focusOrInsert(view: EditorView, transactionProvider: (from: number, to: number, sug: Suggestion) => Promise<Transaction | undefined>): boolean;
|
|
25
|
+
insert(view: EditorView, transactionProvider: (from: number, to: number, sug: Suggestion) => Promise<Transaction | undefined>): boolean;
|
|
26
|
+
arrowUp(): boolean;
|
|
27
|
+
arrowDown(): boolean;
|
|
28
|
+
update(view: EditorView, lastState?: EditorState): void;
|
|
29
|
+
private display;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SuggestionPalette = void 0;
|
|
16
|
+
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
17
|
+
class SuggestionPalette {
|
|
18
|
+
constructor(schema, view, suggestionProvider, suggestionStopWordsProvider, delay) {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
this.delay = () => false;
|
|
21
|
+
this.lastTime = 0;
|
|
22
|
+
this.hasFocus = false;
|
|
23
|
+
this.suggestions = [];
|
|
24
|
+
this.schema = schema;
|
|
25
|
+
this.suggestionStopWordsProvider = suggestionStopWordsProvider;
|
|
26
|
+
this.suggestionProvider = suggestionProvider;
|
|
27
|
+
this.palette = document.createElement('div');
|
|
28
|
+
this.palette.className = 'suggestion-palette';
|
|
29
|
+
(_b = (_a = view.dom) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.appendChild(this.palette);
|
|
30
|
+
delay && (this.delay = delay);
|
|
31
|
+
this.update(view, undefined);
|
|
32
|
+
}
|
|
33
|
+
focusItem(idx) {
|
|
34
|
+
const ul = this.palette.getElementsByTagName('ul')[0];
|
|
35
|
+
if (ul) {
|
|
36
|
+
ul.classList.add('focused');
|
|
37
|
+
const lis = ul.getElementsByTagName('li');
|
|
38
|
+
this.currentFocus !== undefined && lis[this.currentFocus].classList.remove('focused');
|
|
39
|
+
idx !== undefined && lis[idx].classList.add('focused');
|
|
40
|
+
this.currentFocus = idx;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
focus() {
|
|
44
|
+
if (this.palette.style.display === 'none')
|
|
45
|
+
return false;
|
|
46
|
+
this.hasFocus = true;
|
|
47
|
+
this.focusItem(0);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
focusOrInsert(view, transactionProvider) {
|
|
51
|
+
if (this.palette.style.display === 'none')
|
|
52
|
+
return false;
|
|
53
|
+
return this.hasFocus ? this.insert(view, transactionProvider) : this.focus();
|
|
54
|
+
}
|
|
55
|
+
insert(view, transactionProvider) {
|
|
56
|
+
if (this.palette.style.display === 'none' || !this.hasFocus || this.currentFocus === undefined)
|
|
57
|
+
return false;
|
|
58
|
+
const sug = this.suggestions[this.currentFocus];
|
|
59
|
+
if (sug) {
|
|
60
|
+
const sel = view.state.selection;
|
|
61
|
+
const stopWords = this.suggestionStopWordsProvider();
|
|
62
|
+
let length = sug.terms.join(' ').length - 1;
|
|
63
|
+
while (sel.to - length >= 0 &&
|
|
64
|
+
!(0, fast_deep_equal_1.default)(view.state.doc
|
|
65
|
+
.textBetween(sel.to - length, sel.to)
|
|
66
|
+
.split(/\s+/)
|
|
67
|
+
.filter((x) => !stopWords.has(x)), sug.terms)) {
|
|
68
|
+
length++;
|
|
69
|
+
}
|
|
70
|
+
if (length > sel.to) {
|
|
71
|
+
length = sug.terms.join(' ').length;
|
|
72
|
+
while (sel.to - length >= 0 && !view.state.doc.textBetween(sel.to - length, sel.to).startsWith(sug.terms[0])) {
|
|
73
|
+
length++;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (length <= sel.to) {
|
|
77
|
+
transactionProvider(sel.to - length, sel.to, sug).then((tr) => tr && view.dispatch(tr.scrollIntoView()));
|
|
78
|
+
}
|
|
79
|
+
this.palette.style.display = 'none';
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
arrowUp() {
|
|
85
|
+
if (!this.hasFocus)
|
|
86
|
+
return false;
|
|
87
|
+
this.currentFocus && this.focusItem(this.currentFocus - 1);
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
arrowDown() {
|
|
91
|
+
if (!this.hasFocus)
|
|
92
|
+
return false;
|
|
93
|
+
this.currentFocus !== undefined && this.currentFocus < this.palette.getElementsByTagName('ul')[0].childElementCount - 1 && this.focusItem(this.currentFocus + 1);
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
update(view, lastState) {
|
|
97
|
+
const state = view.state;
|
|
98
|
+
// Hide the palette if the selection is not empty
|
|
99
|
+
this.focusItem(undefined);
|
|
100
|
+
this.hasFocus = false;
|
|
101
|
+
if (!state.selection.empty) {
|
|
102
|
+
this.palette.style.display = 'none';
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const $pos = state.selection.$head;
|
|
106
|
+
if ((lastState === null || lastState === void 0 ? void 0 : lastState.doc.textContent) === state.doc.textContent) {
|
|
107
|
+
this.palette.style.display = 'none';
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const text = state.doc.textBetween($pos.pos && $pos.depth ? $pos.before() + 1 : 0, $pos.pos);
|
|
111
|
+
const words = text.split(/\s+/);
|
|
112
|
+
const lastWordDelta = Math.min(words
|
|
113
|
+
.concat()
|
|
114
|
+
.reverse()
|
|
115
|
+
.reduce((d, w) => (d < 0 ? d : w.length ? -d - w.length : d + 1), 0), -1);
|
|
116
|
+
console.log('lwd', lastWordDelta);
|
|
117
|
+
if ($pos.pos > 1 && state.doc.rangeHasMark($pos.pos + lastWordDelta, $pos.pos, this.schema.marks['link'])) {
|
|
118
|
+
console.log('Skip suggestion');
|
|
119
|
+
this.palette.style.display = 'none';
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const terms = words.filter((x) => x.length > 2 && !this.suggestionStopWordsProvider().has(x));
|
|
123
|
+
const lastTerms = terms.length > 3 ? terms.slice(length - 3) : terms;
|
|
124
|
+
const fingerprint = lastTerms.join(' ');
|
|
125
|
+
const { to } = state.selection;
|
|
126
|
+
if (this.previousFingerprint !== fingerprint) {
|
|
127
|
+
this.previousFingerprint = fingerprint;
|
|
128
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
if (this.previousFingerprint !== fingerprint)
|
|
130
|
+
return;
|
|
131
|
+
const res = yield this.suggestionProvider(lastTerms);
|
|
132
|
+
this.suggestions = res;
|
|
133
|
+
if (res.length) {
|
|
134
|
+
this.palette.innerHTML = `<ul>${res
|
|
135
|
+
.map((x) => `<li id="${x.id}" data-code="${x.code}">${x.text}<div class="icn-container"><svg class="tab-icn" viewBox="0 0 24 24"><path d="M12.29 8.12L15.17 11H2c-.55 0-1 .45-1 1s.45 1 1 1h13.17l-2.88 2.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L13.7 6.7c-.39-.39-1.02-.39-1.41 0-.38.39-.39 1.03 0 1.42zM20 7v10c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1s-1 .45-1 1z"/></svg><svg class="return-icn" viewBox="0 0 24 24"><path d="M19 8v3H5.83l2.88-2.88c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L2.71 11.3c-.39.39-.39 1.02 0 1.41L7.3 17.3c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L5.83 13H20c.55 0 1-.45 1-1V8c0-.55-.45-1-1-1s-1 .45-1 1z"/></svg></div></li>`)
|
|
136
|
+
.join('\n')}</ul>`;
|
|
137
|
+
// These are in screen coordinates
|
|
138
|
+
const end = view.coordsAtPos(to);
|
|
139
|
+
const start = view.coordsAtPos(Math.max(0, to - terms[terms.length - 1].length));
|
|
140
|
+
this.display(start.left > end.left ? end : start, (this.lastTime = +new Date()));
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
this.palette.style.display = 'none';
|
|
144
|
+
}
|
|
145
|
+
}), 30);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
display(pos, time) {
|
|
149
|
+
var _a;
|
|
150
|
+
if (time !== this.lastTime)
|
|
151
|
+
return;
|
|
152
|
+
if (this.delay()) {
|
|
153
|
+
setTimeout(() => this.display(pos, time), 100);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.palette.style.display = '';
|
|
157
|
+
const box = (_a = this.palette.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
158
|
+
const palBox = this.palette.getBoundingClientRect();
|
|
159
|
+
if (box) {
|
|
160
|
+
this.palette.style.left = Math.max(0, Math.min(pos.left - box.left - 12, box.width - palBox.width)) + 'px';
|
|
161
|
+
this.palette.style.top = pos.bottom - box.top + 4 + 'px';
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
destroy() {
|
|
165
|
+
this.palette.remove();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.SuggestionPalette = SuggestionPalette;
|
|
169
|
+
//# sourceMappingURL=suggestion-palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion-palette.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-text-field/suggestion-palette.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sEAAmC;AAQnC,MAAa,iBAAiB;IAa7B,YACC,MAAc,EACd,IAAgB,EAChB,kBAA8D,EAC9D,2BAA8C,EAC9C,KAAqB;;QAhBd,UAAK,GAAkB,GAAG,EAAE,CAAC,KAAK,CAAA;QAClC,aAAQ,GAAG,CAAC,CAAA;QAMZ,aAAQ,GAAG,KAAK,CAAA;QAChB,gBAAW,GAAiB,EAAE,CAAA;QAUrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,2BAA2B,GAAG,2BAA2B,CAAA;QAC9D,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAA;QAC5C,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QAC5C,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,oBAAoB,CAAA;QAE7C,MAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,UAAU,0CAAE,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAE/C,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAA;QAE7B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;IAC7B,CAAC;IAED,SAAS,CAAC,GAAY;QACrB,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACrD,IAAI,EAAE,EAAE;YACP,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;YAC3B,MAAM,GAAG,GAAG,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;YACzC,IAAI,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 @@
|
|
|
1
|
+
export * from './components';
|
package/tmp/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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("./components"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/tmp/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tmp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CodeStub, Contact, Content, Service } from '@icure/api';
|
|
2
|
+
import { Field } from '../components/iqr-form/model';
|
|
3
|
+
import { ServicesHistory } from '../components/iqr-form-loader';
|
|
4
|
+
import { FormValuesContainer } from '../components/iqr-form-loader';
|
|
5
|
+
import { VersionedMeta, VersionedValue } from '../components';
|
|
6
|
+
export declare function fuzzyDate(epochOrLongCalendar?: number): Date | undefined;
|
|
7
|
+
export declare function isCodeEqual(c1: CodeStub, c2: CodeStub): boolean;
|
|
8
|
+
export declare function areCodesEqual(c1s: CodeStub[], c2s: CodeStub[]): boolean;
|
|
9
|
+
export declare function isServiceEqual(svc1: Service, svc2: Service): boolean;
|
|
10
|
+
export declare function isContentEqual(content1: Content, content2: Content): boolean;
|
|
11
|
+
export declare function isServiceContentEqual(content1: {
|
|
12
|
+
[language: string]: Content;
|
|
13
|
+
}, content2: {
|
|
14
|
+
[language: string]: Content;
|
|
15
|
+
}): boolean;
|
|
16
|
+
export declare function convertServicesToVersionedValues(versions: ServicesHistory, extractValueFromContent: (content: Content) => string): VersionedValue[];
|
|
17
|
+
export declare function convertServicesToVersionedMetas(versions: ServicesHistory): VersionedMeta[];
|
|
18
|
+
export declare function getVersions(formsValueContainer: FormValuesContainer, field: Field): ServicesHistory;
|
|
19
|
+
export declare function setServices(ctc: Contact, newServices: Service[], modifiedServices: Service[]): Contact;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.setServices = exports.getVersions = exports.convertServicesToVersionedMetas = exports.convertServicesToVersionedValues = exports.isServiceContentEqual = exports.isContentEqual = exports.isServiceEqual = exports.areCodesEqual = exports.isCodeEqual = exports.fuzzyDate = void 0;
|
|
7
|
+
const parse_1 = __importDefault(require("date-fns/parse"));
|
|
8
|
+
const api_1 = require("@icure/api");
|
|
9
|
+
function fuzzyDate(epochOrLongCalendar) {
|
|
10
|
+
if (!epochOrLongCalendar && epochOrLongCalendar !== 0) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
if (epochOrLongCalendar >= 18000101 && epochOrLongCalendar < 25400000) {
|
|
14
|
+
return (0, parse_1.default)('' + epochOrLongCalendar, 'YYYYMMDD', new Date());
|
|
15
|
+
}
|
|
16
|
+
else if (epochOrLongCalendar >= 18000101000000) {
|
|
17
|
+
return (0, parse_1.default)('' + epochOrLongCalendar, 'YYYYMMDDHHmmss', new Date());
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return new Date(epochOrLongCalendar);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.fuzzyDate = fuzzyDate;
|
|
24
|
+
function isCodeEqual(c1, c2) {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
const idParts1 = (_a = c1.id) === null || _a === void 0 ? void 0 : _a.split('|');
|
|
27
|
+
const idParts2 = (_b = c2.id) === null || _b === void 0 ? void 0 : _b.split('|');
|
|
28
|
+
const type1 = c1.type || (idParts1 === null || idParts1 === void 0 ? void 0 : idParts1[0]);
|
|
29
|
+
const type2 = c2.type || (idParts2 === null || idParts2 === void 0 ? void 0 : idParts2[0]);
|
|
30
|
+
const code1 = c1.code || (idParts1 === null || idParts1 === void 0 ? void 0 : idParts1[1]);
|
|
31
|
+
const code2 = c2.code || (idParts2 === null || idParts2 === void 0 ? void 0 : idParts2[1]);
|
|
32
|
+
const version1 = c1.version || (idParts1 === null || idParts1 === void 0 ? void 0 : idParts1[2]);
|
|
33
|
+
const version2 = c2.version || (idParts2 === null || idParts2 === void 0 ? void 0 : idParts2[2]);
|
|
34
|
+
return type1 === type2 && code1 === code2 && version1 === version2;
|
|
35
|
+
}
|
|
36
|
+
exports.isCodeEqual = isCodeEqual;
|
|
37
|
+
function areCodesEqual(c1s, c2s) {
|
|
38
|
+
return c1s.every((c1) => c2s.some((c2) => isCodeEqual(c1, c2)) || false) && c2s.every((c2) => c1s.some((c1) => isCodeEqual(c1, c2)) || false);
|
|
39
|
+
}
|
|
40
|
+
exports.areCodesEqual = areCodesEqual;
|
|
41
|
+
function isServiceEqual(svc1, svc2) {
|
|
42
|
+
return (svc1.id === svc2.id && svc1.valueDate === svc2.valueDate && areCodesEqual(svc1.codes || [], svc2.codes || []) && isServiceContentEqual(svc1.content || {}, svc2.content || {}));
|
|
43
|
+
}
|
|
44
|
+
exports.isServiceEqual = isServiceEqual;
|
|
45
|
+
function isContentEqual(content1, content2) {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
return (((!content1.binaryValue && !content2.binaryValue) || content1.binaryValue === content2.binaryValue) &&
|
|
48
|
+
(((content1.booleanValue === null || content1.booleanValue === undefined) && (content2.booleanValue === null || content2.booleanValue === undefined)) ||
|
|
49
|
+
content1.booleanValue === content2.booleanValue) &&
|
|
50
|
+
((!content1.documentId && !content2.documentId) || content1.documentId === content2.documentId) &&
|
|
51
|
+
(((content1.fuzzyDateValue === null || content1.fuzzyDateValue === undefined) && (content2.fuzzyDateValue === null || content2.fuzzyDateValue === undefined)) ||
|
|
52
|
+
content1.fuzzyDateValue === content2.fuzzyDateValue) &&
|
|
53
|
+
((!content1.instantValue && !content2.instantValue) || content1.instantValue === content2.instantValue) &&
|
|
54
|
+
((!content1.measureValue && !content2.measureValue) || content1.measureValue === content2.measureValue) &&
|
|
55
|
+
((!content1.medicationValue && !content2.medicationValue) || content1.medicationValue === content2.medicationValue) &&
|
|
56
|
+
((!content1.stringValue && !content2.stringValue) || content1.stringValue === content2.stringValue) &&
|
|
57
|
+
(((content1.numberValue === null || content1.numberValue === undefined) && (content2.numberValue === null || content2.numberValue === undefined)) ||
|
|
58
|
+
content1.numberValue === content2.numberValue) &&
|
|
59
|
+
((!content1.compoundValue && !content2.compoundValue) ||
|
|
60
|
+
((((_a = content1.compoundValue) === null || _a === void 0 ? void 0 : _a.every((s1) => { var _a; return (_a = content2.compoundValue) === null || _a === void 0 ? void 0 : _a.some((s2) => isServiceEqual(s1, s2)); })) || false) &&
|
|
61
|
+
(((_b = content2 === null || content2 === void 0 ? void 0 : content2.compoundValue) === null || _b === void 0 ? void 0 : _b.every((s2) => { var _a; return (_a = content1 === null || content1 === void 0 ? void 0 : content1.compoundValue) === null || _a === void 0 ? void 0 : _a.some((s1) => isServiceEqual(s1, s2)); })) || false))));
|
|
62
|
+
}
|
|
63
|
+
exports.isContentEqual = isContentEqual;
|
|
64
|
+
function isServiceContentEqual(content1, content2) {
|
|
65
|
+
return Object.keys(content1).reduce((isEqual, lng) => isEqual && isContentEqual(content1[lng], content2[lng]), true);
|
|
66
|
+
}
|
|
67
|
+
exports.isServiceContentEqual = isServiceContentEqual;
|
|
68
|
+
function convertServicesToVersionedValues(versions, extractValueFromContent) {
|
|
69
|
+
return Object.entries(versions).map(([key, value]) => ({
|
|
70
|
+
id: key,
|
|
71
|
+
versions: value.map((s) => {
|
|
72
|
+
var _a, _b, _c;
|
|
73
|
+
return ({
|
|
74
|
+
revision: '' + ((_a = s.service) === null || _a === void 0 ? void 0 : _a.modified),
|
|
75
|
+
modified: ((_b = s.service) === null || _b === void 0 ? void 0 : _b.modified) || 0,
|
|
76
|
+
value: Object.entries(((_c = s.service) === null || _c === void 0 ? void 0 : _c.content) || {}).reduce((acc, [lng, content]) => (Object.assign(Object.assign({}, acc), { [lng]: extractValueFromContent(content) })), {}),
|
|
77
|
+
});
|
|
78
|
+
}),
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
exports.convertServicesToVersionedValues = convertServicesToVersionedValues;
|
|
82
|
+
function convertServicesToVersionedMetas(versions) {
|
|
83
|
+
return Object.entries(versions).map(([key, value]) => ({
|
|
84
|
+
id: key,
|
|
85
|
+
metas: value.map((s) => {
|
|
86
|
+
var _a, _b, _c, _d, _e;
|
|
87
|
+
return ({
|
|
88
|
+
revision: '' + ((_a = s.service) === null || _a === void 0 ? void 0 : _a.modified),
|
|
89
|
+
modified: ((_b = s.service) === null || _b === void 0 ? void 0 : _b.modified) || 0,
|
|
90
|
+
valueDate: (_c = s.service) === null || _c === void 0 ? void 0 : _c.valueDate,
|
|
91
|
+
owner: ((_d = s.service) === null || _d === void 0 ? void 0 : _d.responsible) ? { id: (_e = s.service) === null || _e === void 0 ? void 0 : _e.responsible } : undefined,
|
|
92
|
+
});
|
|
93
|
+
}),
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
exports.convertServicesToVersionedMetas = convertServicesToVersionedMetas;
|
|
97
|
+
function getVersions(formsValueContainer, field) {
|
|
98
|
+
return ((formsValueContainer === null || formsValueContainer === void 0 ? void 0 : formsValueContainer.getVersions((svc) => { var _a; return ((_a = field.tags) === null || _a === void 0 ? void 0 : _a.length) ? field.tags.every((t) => (svc.tags || []).some((tt) => (0, api_1.normalizeCode)(tt).id === t)) : svc.label === field.label(); })) || {});
|
|
99
|
+
}
|
|
100
|
+
exports.getVersions = getVersions;
|
|
101
|
+
function setServices(ctc, newServices, modifiedServices) {
|
|
102
|
+
var _a;
|
|
103
|
+
return new api_1.Contact(Object.assign(Object.assign({}, ctc), { services: newServices.concat(((_a = ctc.services) === null || _a === void 0 ? void 0 : _a.map((s) => modifiedServices.find((r) => r.id === s.id) || s)) || []) }));
|
|
104
|
+
}
|
|
105
|
+
exports.setServices = setServices;
|
|
106
|
+
//# sourceMappingURL=icure-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icure-utils.js","sourceRoot":"","sources":["../../../tmp/utils/icure-utils.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAkC;AAClC,oCAA+E;AAM/E,SAAgB,SAAS,CAAC,mBAA4B;IACrD,IAAI,CAAC,mBAAmB,IAAI,mBAAmB,KAAK,CAAC,EAAE;QACtD,OAAO,SAAS,CAAA;KAChB;IACD,IAAI,mBAAmB,IAAI,QAAQ,IAAI,mBAAmB,GAAG,QAAQ,EAAE;QACtE,OAAO,IAAA,eAAK,EAAC,EAAE,GAAG,mBAAmB,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,CAAA;KAC9D;SAAM,IAAI,mBAAmB,IAAI,cAAc,EAAE;QACjD,OAAO,IAAA,eAAK,EAAC,EAAE,GAAG,mBAAmB,EAAE,gBAAgB,EAAE,IAAI,IAAI,EAAE,CAAC,CAAA;KACpE;SAAM;QACN,OAAO,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAA;KACpC;AACF,CAAC;A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AI,0CAAE,MAAM,EAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,mBAAa,EAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,EAAE,CAAA,EAAA,CACrI,KAAI,EAAE,CACP,CAAA;AACF,CAAC;AAND,kCAMC;AAED,SAAgB,WAAW,CAAC,GAAY,EAAE,WAAsB,EAAE,gBAA2B;;IAC5F,OAAO,IAAI,aAAO,iCACd,GAAG,KACN,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA,MAAA,GAAG,CAAC,QAAQ,0CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAI,EAAE,CAAC,IAC7G,CAAA;AACH,CAAC;AALD,kCAKC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.languageName = exports.languages = void 0;
|
|
4
|
+
exports.languages = {
|
|
5
|
+
en: 'English',
|
|
6
|
+
fr: 'French',
|
|
7
|
+
es: 'Spanish',
|
|
8
|
+
nl: 'Dutch',
|
|
9
|
+
de: 'German',
|
|
10
|
+
};
|
|
11
|
+
function languageName(iso) {
|
|
12
|
+
return exports.languages[iso] || iso;
|
|
13
|
+
}
|
|
14
|
+
exports.languageName = languageName;
|
|
15
|
+
//# sourceMappingURL=languages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../../tmp/utils/languages.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACxB,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;CACZ,CAAA;AAED,SAAgB,YAAY,CAAC,GAAW;IACvC,OAAO,iBAAS,CAAC,GAAG,CAAC,IAAI,GAAG,CAAA;AAC7B,CAAC;AAFD,oCAEC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function groupBy<K, I extends string | number>(items: K[], grouper: (item: K) => I): {
|
|
2
|
+
[key: I]: K;
|
|
3
|
+
};
|
|
4
|
+
export declare function sortedBy<K>(items: K[], key: string | ((a: K) => any), direction?: string): K[];
|
|
5
|
+
export declare function sorted<K>(items: K[], direction?: string): K[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sorted = exports.sortedBy = exports.groupBy = void 0;
|
|
4
|
+
function groupBy(items, grouper) {
|
|
5
|
+
return items.reduce((r, v, i, a, k = grouper(v)) => {
|
|
6
|
+
;
|
|
7
|
+
(r[k] || (r[k] = [])).push(v);
|
|
8
|
+
return r;
|
|
9
|
+
}, {});
|
|
10
|
+
}
|
|
11
|
+
exports.groupBy = groupBy;
|
|
12
|
+
function sortedBy(items, key, direction = 'asc') {
|
|
13
|
+
if (typeof key === 'function') {
|
|
14
|
+
return items.concat().sort(direction === 'asc' ? (a, b) => (key(a) > key(b) ? 1 : key(b) > key(a) ? -1 : 0) : (a, b) => (key(a) < key(b) ? 1 : key(b) < key(a) ? -1 : 0));
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return items.concat().sort(direction === 'asc' ? (a, b) => (a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0) : (a, b) => (a[key] < b[key] ? 1 : b[key] < a[key] ? -1 : 0));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.sortedBy = sortedBy;
|
|
21
|
+
function sorted(items, direction = 'asc') {
|
|
22
|
+
return items.concat().sort(direction === 'asc' ? (a, b) => (a > b ? 1 : b > a ? -1 : 0) : (a, b) => (a < b ? 1 : b < a ? -1 : 0));
|
|
23
|
+
}
|
|
24
|
+
exports.sorted = sorted;
|
|
25
|
+
//# sourceMappingURL=no-lodash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-lodash.js","sourceRoot":"","sources":["../../../tmp/utils/no-lodash.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CACtB,KAAU,EACV,OAAuB;IAKvB,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QAClD,CAAC;QAAA,CAAC,CAAC,CAAC,CAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAoB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACpE,OAAO,CAAC,CAAA;IACT,CAAC,EAAE,EAAE,CAAC,CAAA;AACP,CAAC;AAXD,0BAWC;AAED,SAAgB,QAAQ,CAAI,KAAU,EAAE,GAA6B,EAAE,SAAS,GAAG,KAAK;IACvF,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC9B,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAClI,CAAC;AAFD,wBAEC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class DatePicker extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class DateTimePicker extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class MeasureField extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class MultipleChoice extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class NumberField extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const lit_element_1 = require("lit-element");
|
|
13
|
-
require("../../iqr-text-field");
|
|
14
|
-
class Textfield extends lit_element_1.LitElement {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.label = '';
|
|
18
|
-
this.multiline = false;
|
|
19
|
-
this.rows = 1;
|
|
20
|
-
this.grows = false;
|
|
21
|
-
this.labelPosition = undefined;
|
|
22
|
-
this.suggestionStopWords = new Set();
|
|
23
|
-
this.linksProvider = () => Promise.resolve(undefined);
|
|
24
|
-
this.suggestionProvider = () => [];
|
|
25
|
-
this.codeColorProvider = () => 'XI';
|
|
26
|
-
this.linkColorProvider = () => 'cat1';
|
|
27
|
-
this.codeContentProvider = (codes) => codes.map(c => c.code).join(',');
|
|
28
|
-
}
|
|
29
|
-
static get styles() {
|
|
30
|
-
return [lit_element_1.css `
|
|
31
|
-
:host {
|
|
32
|
-
}
|
|
33
|
-
`];
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
return lit_element_1.html `
|
|
37
|
-
<iqr-text-field labelPosition=${this.labelPosition} ?multiline="${this.multiline}" label="${this.label}" ?suggestions=${!!this.suggestionProvider} ?links=${!!this.linksProvider}
|
|
38
|
-
.linksProvider=${this.linksProvider} .suggestionProvider=${this.suggestionProvider} .codeColorProvider=${this.codeColorProvider} .linkColorProvider=${this.linkColorProvider} .codeContentProvider=${this.codeContentProvider}></iqr-text-field>
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
__decorate([
|
|
43
|
-
lit_element_1.property(),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], Textfield.prototype, "label", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
lit_element_1.property(),
|
|
48
|
-
__metadata("design:type", Boolean)
|
|
49
|
-
], Textfield.prototype, "multiline", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
lit_element_1.property(),
|
|
52
|
-
__metadata("design:type", Number)
|
|
53
|
-
], Textfield.prototype, "rows", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
lit_element_1.property(),
|
|
56
|
-
__metadata("design:type", Boolean)
|
|
57
|
-
], Textfield.prototype, "grows", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
lit_element_1.property(),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], Textfield.prototype, "labelPosition", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
lit_element_1.property(),
|
|
64
|
-
__metadata("design:type", Set)
|
|
65
|
-
], Textfield.prototype, "suggestionStopWords", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
lit_element_1.property(),
|
|
68
|
-
__metadata("design:type", Function)
|
|
69
|
-
], Textfield.prototype, "linksProvider", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
lit_element_1.property(),
|
|
72
|
-
__metadata("design:type", Function)
|
|
73
|
-
], Textfield.prototype, "suggestionProvider", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
lit_element_1.property(),
|
|
76
|
-
__metadata("design:type", Function)
|
|
77
|
-
], Textfield.prototype, "codeColorProvider", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
lit_element_1.property(),
|
|
80
|
-
__metadata("design:type", Function)
|
|
81
|
-
], Textfield.prototype, "linkColorProvider", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
lit_element_1.property(),
|
|
84
|
-
__metadata("design:type", Function)
|
|
85
|
-
], Textfield.prototype, "codeContentProvider", void 0);
|
|
86
|
-
customElements.define('iqr-form-textfield', Textfield);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class TimePicker extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|