@icure/form 1.0.12 → 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 +12 -12
- package/{components → src/components}/index.d.ts +0 -0
- package/{components → src/components}/index.js +5 -1
- package/src/components/index.js.map +1 -0
- package/{components → src/components}/iqr-form/fields/datePicker.d.ts +0 -0
- package/{components → src/components}/iqr-form/fields/datePicker.js +5 -5
- package/src/components/iqr-form/fields/datePicker.js.map +1 -0
- package/{components → src/components}/iqr-form/fields/dateTimePicker.d.ts +0 -0
- package/{components → src/components}/iqr-form/fields/dateTimePicker.js +5 -5
- package/src/components/iqr-form/fields/dateTimePicker.js.map +1 -0
- package/{components → src/components}/iqr-form/fields/measureField.d.ts +0 -0
- package/{components → src/components}/iqr-form/fields/measureField.js +4 -4
- package/src/components/iqr-form/fields/measureField.js.map +1 -0
- package/{components → src/components}/iqr-form/fields/multipleChoice.d.ts +0 -0
- package/{components → src/components}/iqr-form/fields/multipleChoice.js +4 -4
- package/src/components/iqr-form/fields/multipleChoice.js.map +1 -0
- package/{components → src/components}/iqr-form/fields/numberField.d.ts +0 -0
- package/{components → src/components}/iqr-form/fields/numberField.js +4 -4
- package/src/components/iqr-form/fields/numberField.js.map +1 -0
- package/{components → src/components}/iqr-form/fields/textfield.d.ts +0 -0
- package/{components → src/components}/iqr-form/fields/textfield.js +38 -35
- package/src/components/iqr-form/fields/textfield.js.map +1 -0
- package/{components → src/components}/iqr-form/fields/timePicker.d.ts +0 -0
- package/{components → src/components}/iqr-form/fields/timePicker.js +5 -5
- 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/{components → src/components}/iqr-form/legacy/Content.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/Content.js +0 -0
- package/src/components/iqr-form/legacy/Content.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/Data.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/Data.js +0 -0
- package/src/components/iqr-form/legacy/Data.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/Editor.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/Editor.js +0 -0
- package/src/components/iqr-form/legacy/Editor.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/FormColumn.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/FormColumn.js +0 -0
- package/src/components/iqr-form/legacy/FormColumn.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/FormDataOption.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/FormDataOption.js +0 -0
- package/src/components/iqr-form/legacy/FormDataOption.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/FormLayout.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/FormLayout.js +0 -0
- package/src/components/iqr-form/legacy/FormLayout.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/FormLayoutData.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/FormLayoutData.js +0 -0
- package/src/components/iqr-form/legacy/FormLayoutData.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/FormPlanning.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/FormPlanning.js +0 -0
- package/src/components/iqr-form/legacy/FormPlanning.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/FormSection.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/FormSection.js +0 -0
- package/src/components/iqr-form/legacy/FormSection.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/Formula.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/Formula.js +0 -0
- package/src/components/iqr-form/legacy/Formula.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/GuiCode.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/GuiCode.js +0 -0
- package/src/components/iqr-form/legacy/GuiCode.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/GuiCodeType.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/GuiCodeType.js +0 -0
- package/src/components/iqr-form/legacy/GuiCodeType.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/Suggest.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/Suggest.js +0 -0
- package/src/components/iqr-form/legacy/Suggest.js.map +1 -0
- package/{components → src/components}/iqr-form/legacy/Tag.d.ts +0 -0
- package/{components → src/components}/iqr-form/legacy/Tag.js +0 -0
- package/src/components/iqr-form/legacy/Tag.js.map +1 -0
- package/{components → src/components}/iqr-form/model/index.d.ts +0 -0
- package/{components → src/components}/iqr-form/model/index.js +0 -0
- package/src/components/iqr-form/model/index.js.map +1 -0
- package/{components → src/components}/iqr-form/renderer/cards.d.ts +0 -0
- 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 +0 -0
- package/{components → src/components}/iqr-form/renderer/form.js +28 -28
- package/src/components/iqr-form/renderer/form.js.map +1 -0
- package/{components → src/components}/iqr-form/renderer/index.d.ts +0 -0
- package/{components → src/components}/iqr-form/renderer/index.js +0 -0
- package/src/components/iqr-form/renderer/index.js.map +1 -0
- package/{components → src/components}/iqr-form/utils.d.ts +0 -0
- package/{components → src/components}/iqr-form/utils.js +4 -4
- package/src/components/iqr-form/utils.js.map +1 -0
- package/{components → src/components}/iqr-form-loader/fieldsValuesProviders.d.ts +0 -0
- package/{components → src/components}/iqr-form-loader/fieldsValuesProviders.js +7 -7
- package/src/components/iqr-form-loader/fieldsValuesProviders.js.map +1 -0
- package/{components → src/components}/iqr-form-loader/formValuesContainer.d.ts +0 -0
- package/{components → src/components}/iqr-form-loader/formValuesContainer.js +7 -7
- package/src/components/iqr-form-loader/formValuesContainer.js.map +1 -0
- package/{components → src/components}/iqr-form-loader/index.d.ts +0 -0
- package/{components → src/components}/iqr-form-loader/index.js +5 -1
- package/src/components/iqr-form-loader/index.js.map +1 -0
- package/{components → src/components}/iqr-form-loader/models.d.ts +0 -0
- package/{components → src/components}/iqr-form-loader/models.js +0 -0
- package/src/components/iqr-form-loader/models.js.map +1 -0
- package/{components → src/components}/iqr-text-field/index.d.ts +0 -0
- package/src/components/iqr-text-field/index.js +490 -0
- package/src/components/iqr-text-field/index.js.map +1 -0
- package/{components → src/components}/iqr-text-field/plugin/caret-fix-plugin.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/plugin/caret-fix-plugin.js +0 -0
- package/src/components/iqr-text-field/plugin/caret-fix-plugin.js.map +1 -0
- package/{components → src/components}/iqr-text-field/plugin/has-content-class-plugin.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/plugin/has-content-class-plugin.js +0 -0
- package/src/components/iqr-text-field/plugin/has-content-class-plugin.js.map +1 -0
- package/{components → src/components}/iqr-text-field/plugin/mask-plugin.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/plugin/mask-plugin.js +0 -0
- package/src/components/iqr-text-field/plugin/mask-plugin.js.map +1 -0
- package/{components → src/components}/iqr-text-field/plugin/regexp-plugin.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/plugin/regexp-plugin.js +0 -0
- package/src/components/iqr-text-field/plugin/regexp-plugin.js.map +1 -0
- package/{components → src/components}/iqr-text-field/prosemirror-commands.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/prosemirror-commands.js +2 -2
- package/src/components/iqr-text-field/prosemirror-commands.js.map +1 -0
- package/{components → src/components}/iqr-text-field/prosemirror-utils.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/prosemirror-utils.js +0 -0
- package/src/components/iqr-text-field/prosemirror-utils.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/common-marks.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/schema/common-marks.js +0 -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 +0 -0
- 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 +0 -0
- package/src/components/iqr-text-field/schema/decimal-schema.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/index.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/schema/index.js +7 -7
- 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 +2 -2
- 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 +0 -0
- 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 +2 -2
- package/src/components/iqr-text-field/schema/token-schema.js.map +1 -0
- package/{components → src/components}/iqr-text-field/schema/utils.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/schema/utils.js +0 -0
- package/src/components/iqr-text-field/schema/utils.js.map +1 -0
- package/{components → src/components}/iqr-text-field/selection-companion.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/selection-companion.js +0 -0
- package/src/components/iqr-text-field/selection-companion.js.map +1 -0
- package/{components → src/components}/iqr-text-field/styles/paths.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/styles/paths.js +5 -5
- package/src/components/iqr-text-field/styles/paths.js.map +1 -0
- package/{components → src/components}/iqr-text-field/suggestion-palette.d.ts +0 -0
- package/{components → src/components}/iqr-text-field/suggestion-palette.js +1 -1
- 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} +5 -1
- package/src/index.js.map +1 -0
- package/{utils → src/utils}/icure-utils.d.ts +0 -0
- package/{utils → src/utils}/icure-utils.js +3 -3
- package/src/utils/icure-utils.js.map +1 -0
- package/{utils → src/utils}/languages.d.ts +0 -0
- package/{utils → src/utils}/languages.js +0 -0
- package/src/utils/languages.js.map +1 -0
- package/{utils → src/utils}/no-lodash.d.ts +0 -0
- package/{utils → src/utils}/no-lodash.js +0 -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 +10 -10
- 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 +65 -63
- 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/index.js.map +0 -1
- package/components/iqr-form/fields/datePicker.js.map +0 -1
- package/components/iqr-form/fields/dateTimePicker.js.map +0 -1
- package/components/iqr-form/fields/measureField.js.map +0 -1
- package/components/iqr-form/fields/multipleChoice.js.map +0 -1
- package/components/iqr-form/fields/numberField.js.map +0 -1
- package/components/iqr-form/fields/textfield.js.map +0 -1
- package/components/iqr-form/fields/timePicker.js.map +0 -1
- package/components/iqr-form/index.js.map +0 -1
- package/components/iqr-form/legacy/Content.js.map +0 -1
- package/components/iqr-form/legacy/Data.js.map +0 -1
- package/components/iqr-form/legacy/Editor.js.map +0 -1
- package/components/iqr-form/legacy/FormColumn.js.map +0 -1
- package/components/iqr-form/legacy/FormDataOption.js.map +0 -1
- package/components/iqr-form/legacy/FormLayout.js.map +0 -1
- package/components/iqr-form/legacy/FormLayoutData.js.map +0 -1
- package/components/iqr-form/legacy/FormPlanning.js.map +0 -1
- package/components/iqr-form/legacy/FormSection.js.map +0 -1
- package/components/iqr-form/legacy/Formula.js.map +0 -1
- package/components/iqr-form/legacy/GuiCode.js.map +0 -1
- package/components/iqr-form/legacy/GuiCodeType.js.map +0 -1
- package/components/iqr-form/legacy/Suggest.js.map +0 -1
- package/components/iqr-form/legacy/Tag.js.map +0 -1
- package/components/iqr-form/model/index.js.map +0 -1
- package/components/iqr-form/renderer/cards.js +0 -55
- package/components/iqr-form/renderer/cards.js.map +0 -1
- package/components/iqr-form/renderer/form.js.map +0 -1
- package/components/iqr-form/renderer/index.js.map +0 -1
- package/components/iqr-form/utils.js.map +0 -1
- package/components/iqr-form-loader/fieldsValuesProviders.js.map +0 -1
- package/components/iqr-form-loader/formValuesContainer.js.map +0 -1
- package/components/iqr-form-loader/index.js.map +0 -1
- package/components/iqr-form-loader/models.js.map +0 -1
- package/components/iqr-text-field/index.js.map +0 -1
- package/components/iqr-text-field/plugin/caret-fix-plugin.js.map +0 -1
- package/components/iqr-text-field/plugin/has-content-class-plugin.js.map +0 -1
- package/components/iqr-text-field/plugin/mask-plugin.js.map +0 -1
- package/components/iqr-text-field/plugin/regexp-plugin.js.map +0 -1
- package/components/iqr-text-field/prosemirror-commands.js.map +0 -1
- package/components/iqr-text-field/prosemirror-utils.js.map +0 -1
- package/components/iqr-text-field/schema/common-marks.js.map +0 -1
- package/components/iqr-text-field/schema/date-time-schema.js.map +0 -1
- package/components/iqr-text-field/schema/decimal-schema.js.map +0 -1
- package/components/iqr-text-field/schema/index.js.map +0 -1
- package/components/iqr-text-field/schema/markdown-schema.js.map +0 -1
- package/components/iqr-text-field/schema/measure-schema.js.map +0 -1
- package/components/iqr-text-field/schema/token-schema.js.map +0 -1
- package/components/iqr-text-field/schema/utils.js.map +0 -1
- package/components/iqr-text-field/selection-companion.js.map +0 -1
- package/components/iqr-text-field/styles/paths.js.map +0 -1
- package/components/iqr-text-field/suggestion-palette.js.map +0 -1
- package/index.js.map +0 -1
- package/utils/icure-utils.js.map +0 -1
- package/utils/languages.js.map +0 -1
- package/utils/no-lodash.js.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.regexpPlugin = void 0;
|
|
4
|
+
const prosemirror_state_1 = require("prosemirror-state");
|
|
5
|
+
const regexpPlugin = function () {
|
|
6
|
+
return new prosemirror_state_1.Plugin({
|
|
7
|
+
props: {
|
|
8
|
+
handleTextInput: (view, from, to, text) => {
|
|
9
|
+
if (view.composing)
|
|
10
|
+
return false;
|
|
11
|
+
const state = view.state;
|
|
12
|
+
const $from = state.doc.resolve(from);
|
|
13
|
+
const mask = $from.parent.type.spec.mask;
|
|
14
|
+
const regexp = $from.parent.type.spec.regexp;
|
|
15
|
+
if (mask || !regexp)
|
|
16
|
+
return false; // Will be handled by mask plugin
|
|
17
|
+
const allowedCharacters = text
|
|
18
|
+
.split('')
|
|
19
|
+
.filter((x) => x.match(new RegExp(regexp)))
|
|
20
|
+
.join('');
|
|
21
|
+
if (allowedCharacters === text)
|
|
22
|
+
return false;
|
|
23
|
+
let tr = state.tr;
|
|
24
|
+
if (allowedCharacters.length) {
|
|
25
|
+
tr = tr.insertText(allowedCharacters, from, to);
|
|
26
|
+
tr = tr.setSelection(prosemirror_state_1.TextSelection.create(tr.doc, Math.min(to + allowedCharacters.length, tr.doc.content.size - 1)));
|
|
27
|
+
}
|
|
28
|
+
if (text.startsWith(allowedCharacters)) {
|
|
29
|
+
const tail = text.substring(allowedCharacters.length);
|
|
30
|
+
if (tail === null || tail === void 0 ? void 0 : tail.length) {
|
|
31
|
+
let posMark = tr.selection.$to.pos + 1;
|
|
32
|
+
while (posMark < tr.doc.content.size) {
|
|
33
|
+
const nextPos = tr.doc.resolve(posMark);
|
|
34
|
+
const nextNode = nextPos.node(nextPos.depth);
|
|
35
|
+
if (nextNode && (nextNode.type.isText || nextNode.type.isTextblock)) {
|
|
36
|
+
tr = tr.insertText(tail, nextPos.pos, nextPos.pos);
|
|
37
|
+
tr = tr.setSelection(prosemirror_state_1.TextSelection.create(tr.doc, Math.min(nextPos.pos + tail.length, tr.doc.content.size - 1)));
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
posMark++;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
view.dispatch(tr);
|
|
45
|
+
return true;
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
exports.regexpPlugin = regexpPlugin;
|
|
51
|
+
//# sourceMappingURL=regexp-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regexp-plugin.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/plugin/regexp-plugin.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AAElD,MAAM,YAAY,GAAG;IAC3B,OAAO,IAAI,0BAAM,CAAC;QACjB,KAAK,EAAE;YACN,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;gBACzC,IAAI,IAAI,CAAC,SAAS;oBAAE,OAAO,KAAK,CAAA;gBAEhC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;gBACxB,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;gBACrC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;gBACxC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAA;gBAE5C,IAAI,IAAI,IAAI,CAAC,MAAM;oBAAE,OAAO,KAAK,CAAA,CAAC,iCAAiC;gBAEnE,MAAM,iBAAiB,GAAG,IAAI;qBAC5B,KAAK,CAAC,EAAE,CAAC;qBACT,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;qBAC1C,IAAI,CAAC,EAAE,CAAC,CAAA;gBACV,IAAI,iBAAiB,KAAK,IAAI;oBAAE,OAAO,KAAK,CAAA;gBAE5C,IAAI,EAAE,GAAG,KAAK,CAAC,EAAE,CAAA;gBACjB,IAAI,iBAAiB,CAAC,MAAM,EAAE;oBAC7B,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,iBAAiB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;oBAC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,MAAK;6BACL;4BACD,OAAO,EAAE,CAAA;yBACT;qBACD;iBACD;gBACD,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;gBAEjB,OAAO,IAAI,CAAA;YACZ,CAAC;SACD;KACD,CAAC,CAAA;AACH,CAAC,CAAA;AA/CY,QAAA,YAAY,gBA+CxB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NodeType } from 'prosemirror-model';
|
|
2
|
+
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
export declare function wrapInIfNeeded(nodeType: NodeType, attrs?: {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}): (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
|
|
6
|
+
export declare function unwrapFrom(nodeType: NodeType): (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unwrapFrom = exports.wrapInIfNeeded = void 0;
|
|
4
|
+
const prosemirror_transform_1 = require("prosemirror-transform");
|
|
5
|
+
const prosemirror_model_1 = require("prosemirror-model");
|
|
6
|
+
const prosemirror_state_1 = require("prosemirror-state");
|
|
7
|
+
// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool
|
|
8
|
+
// Wrap the selection in a node of the given type with the given
|
|
9
|
+
// attributes.
|
|
10
|
+
function wrapInIfNeeded(nodeType, attrs) {
|
|
11
|
+
return function (state, dispatch) {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
const { $from, $to, to } = state.selection;
|
|
14
|
+
const range = $from.blockRange($to);
|
|
15
|
+
if (!range) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const same = range.$from.sharedDepth(to);
|
|
19
|
+
if (same) {
|
|
20
|
+
const pos = $from.before(same);
|
|
21
|
+
if (((_b = (_a = prosemirror_state_1.NodeSelection.create(state.doc, pos).$from) === null || _a === void 0 ? void 0 : _a.node()) === null || _b === void 0 ? void 0 : _b.type) === nodeType) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const wrapping = range && (0, prosemirror_transform_1.findWrapping)(range, nodeType, attrs);
|
|
26
|
+
if (!wrapping || !range)
|
|
27
|
+
return false;
|
|
28
|
+
if (dispatch)
|
|
29
|
+
dispatch(state.tr.wrap(range, wrapping).scrollIntoView());
|
|
30
|
+
return true;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
exports.wrapInIfNeeded = wrapInIfNeeded;
|
|
34
|
+
// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool
|
|
35
|
+
// Wrap the selection in a node of the given type with the given
|
|
36
|
+
// attributes.
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
38
|
+
function unwrapFrom(nodeType) {
|
|
39
|
+
return function (state, dispatch) {
|
|
40
|
+
const { $from, $to } = state.selection;
|
|
41
|
+
const range = $from.blockRange($to);
|
|
42
|
+
const depth = range && (0, prosemirror_transform_1.liftTarget)(range);
|
|
43
|
+
if (depth === null || depth === undefined) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
const gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
|
|
47
|
+
const frag = prosemirror_model_1.Fragment.from($from.node());
|
|
48
|
+
if (dispatch)
|
|
49
|
+
dispatch(state.tr.replaceRange(gapStart, gapEnd, new prosemirror_model_1.Slice(frag, 0, 0)).scrollIntoView());
|
|
50
|
+
return true;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.unwrapFrom = unwrapFrom;
|
|
54
|
+
//# sourceMappingURL=prosemirror-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prosemirror-commands.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-text-field/prosemirror-commands.ts"],"names":[],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E,QAAoC;QACxE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,SAAS,CAAA;QACtC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;QACnC,MAAM,KAAK,GAAG,KAAK,IAAI,IAAA,kCAAU,EAAC,KAAK,CAAC,CAAA;QAExC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;YAC1C,OAAO,KAAK,CAAA;SACZ;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,EACvC,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,4BAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;QAExC,IAAI,QAAQ;YAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,yBAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAA;QACvG,OAAO,IAAI,CAAA;IACZ,CAAC,CAAA;AACF,CAAC;AAjBD,gCAiBC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasMark = void 0;
|
|
4
|
+
function hasMark(ms, mark) {
|
|
5
|
+
if (!ms) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
if (!!ms.get) {
|
|
9
|
+
return !!ms.get(mark);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return !!ms[mark];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.hasMark = hasMark;
|
|
16
|
+
//# sourceMappingURL=prosemirror-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prosemirror-utils.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-text-field/prosemirror-utils.ts"],"names":[],"mappings":";;;AAGA,SAAgB,OAAO,CAAC,EAAyE,EAAE,IAAY;IAC9G,IAAI,CAAC,EAAE,EAAE;QACR,OAAO,KAAK,CAAA;KACZ;IACD,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,CAAE,EAA2B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;KAC/C;SAAM;QACN,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;KACjB;AACF,CAAC;AATD,0BASC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MarkSpec } from 'prosemirror-model';
|
|
2
|
+
export declare const colors: {
|
|
3
|
+
[key: string]: [string, string];
|
|
4
|
+
};
|
|
5
|
+
export declare function getMarks(contentProvider: (codes: {
|
|
6
|
+
type: string;
|
|
7
|
+
code: string;
|
|
8
|
+
}[]) => string, colorProvider: (type: string, code: string, isCode: boolean) => string): {
|
|
9
|
+
[key: string]: MarkSpec;
|
|
10
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMarks = exports.colors = void 0;
|
|
4
|
+
exports.colors = {
|
|
5
|
+
I: ['#F44336', 'white'],
|
|
6
|
+
II: ['#E91E63', 'white'],
|
|
7
|
+
III: ['#9C27B0', 'white'],
|
|
8
|
+
IV: ['#673AB7', 'white'],
|
|
9
|
+
V: ['#009688', 'white'],
|
|
10
|
+
VI: ['#4CAF50', 'white'],
|
|
11
|
+
VII: ['#8BC34A', 'white'],
|
|
12
|
+
VIII: ['#03A9F4', 'white'],
|
|
13
|
+
IX: ['#00BCD4', 'white'],
|
|
14
|
+
X: ['#FFC107', 'black'],
|
|
15
|
+
XI: ['#FF9800', 'black'],
|
|
16
|
+
XII: ['#FF5722', 'white'],
|
|
17
|
+
XIII: ['#795548', 'white'],
|
|
18
|
+
XIV: ['#3949AB', 'white'],
|
|
19
|
+
XV: ['#C0CA33', 'black'],
|
|
20
|
+
XVI: ['#07F87F', 'black'],
|
|
21
|
+
XVII: ['#FF6262', 'white'],
|
|
22
|
+
XVIII: ['#718792', 'white'],
|
|
23
|
+
XIX: ['#00ECB9', 'black'],
|
|
24
|
+
XX: ['#FF20A3', 'black'],
|
|
25
|
+
XXI: ['#FFCE38', 'black'],
|
|
26
|
+
XXII: ['#721F01', 'white'],
|
|
27
|
+
};
|
|
28
|
+
const getColor = (c) => exports.colors[c] || [c, 'white'];
|
|
29
|
+
function getMarks(contentProvider, colorProvider) {
|
|
30
|
+
return {
|
|
31
|
+
em: {
|
|
32
|
+
parseDOM: [{ tag: 'i' }, { tag: 'em' }, { style: 'font-style', getAttrs: (value) => value === 'italic' && null }],
|
|
33
|
+
toDOM() {
|
|
34
|
+
return ['em'];
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
strong: {
|
|
38
|
+
parseDOM: [{ tag: 'b' }, { tag: 'strong' }, { style: 'font-weight', getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null }],
|
|
39
|
+
toDOM() {
|
|
40
|
+
return ['strong'];
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
link: {
|
|
44
|
+
attrs: {
|
|
45
|
+
href: {},
|
|
46
|
+
title: { default: null },
|
|
47
|
+
},
|
|
48
|
+
inclusive: false,
|
|
49
|
+
parseDOM: [
|
|
50
|
+
{
|
|
51
|
+
tag: 'span[data-href]',
|
|
52
|
+
getAttrs(dom) {
|
|
53
|
+
const el = dom;
|
|
54
|
+
return { href: el.dataset.href, title: el.dataset.title };
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
toDOM(node) {
|
|
59
|
+
const urls = node.attrs.href;
|
|
60
|
+
if (urls) {
|
|
61
|
+
const refs = urls.split(',').map((url) => {
|
|
62
|
+
const pos = url.indexOf('://');
|
|
63
|
+
const protocol = url.substring(0, pos);
|
|
64
|
+
const code = url.substring(pos + 3);
|
|
65
|
+
const parts = protocol.split('-');
|
|
66
|
+
const category = parts[0];
|
|
67
|
+
const type = parts[1];
|
|
68
|
+
return { category, type, code };
|
|
69
|
+
});
|
|
70
|
+
const codes = refs.filter((x) => x.category === 'c');
|
|
71
|
+
const ilinks = refs.filter((x) => x.category === 'i');
|
|
72
|
+
const classes = (refs.some((x) => x.category === 'x') ? ['ext-link'] : []).concat(codes.length ? [`code-count-${codes.length}`] : []);
|
|
73
|
+
const dataAttributes = (codes.length ? [{ 'data-content': contentProvider(codes) }] : []).concat(ilinks.map((c, idx) => ({ [`data-link-color-${idx}`]: colorProvider(c.type, c.code, false) })));
|
|
74
|
+
const styles = codes.map((c, idx) => {
|
|
75
|
+
const color = getColor(colorProvider(c.type, c.code, true));
|
|
76
|
+
return `--bg-code-color-${idx + 1}: ${color[0]}; --text-code-color-${idx + 1}: ${color[1]};`;
|
|
77
|
+
});
|
|
78
|
+
return [
|
|
79
|
+
'span',
|
|
80
|
+
dataAttributes.reduce((acc, da) => Object.assign(da, acc), {
|
|
81
|
+
['data-href']: node.attrs.href,
|
|
82
|
+
['data-title']: node.attrs.title,
|
|
83
|
+
class: classes.join(' '),
|
|
84
|
+
style: styles.join(''),
|
|
85
|
+
}),
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
return ['span', { ['data-href']: node.attrs.href, ['data-title']: node.attrs.title }];
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
exports.getMarks = getMarks;
|
|
94
|
+
//# sourceMappingURL=common-marks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-marks.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/schema/common-marks.ts"],"names":[],"mappings":";;;AAEa,QAAA,MAAM,GAAwC;IAC1D,CA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AAC;AA7ED,4BA6EC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SchemaSpec } from 'prosemirror-model';
|
|
2
|
+
export declare type DateSchema = 'date';
|
|
3
|
+
export declare type TimeSchema = 'time';
|
|
4
|
+
export declare type DateTimeSchema = 'date-time';
|
|
5
|
+
export declare function getDateSpec(): SchemaSpec;
|
|
6
|
+
export declare function getTimeSpec(): SchemaSpec;
|
|
7
|
+
export declare function getDateTimeSpec(): SchemaSpec;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDateTimeSpec = exports.getTimeSpec = exports.getDateSpec = void 0;
|
|
4
|
+
function getDateSpec() {
|
|
5
|
+
return {
|
|
6
|
+
topNode: 'paragraph',
|
|
7
|
+
nodes: {
|
|
8
|
+
paragraph: {
|
|
9
|
+
content: 'date',
|
|
10
|
+
},
|
|
11
|
+
date: {
|
|
12
|
+
content: 'inline*',
|
|
13
|
+
group: 'block',
|
|
14
|
+
parseDOM: [{ tag: 'span' }],
|
|
15
|
+
toDOM() {
|
|
16
|
+
return ['span', 0];
|
|
17
|
+
},
|
|
18
|
+
regexp: '[0-9]',
|
|
19
|
+
mask: '--/--/----',
|
|
20
|
+
},
|
|
21
|
+
text: {
|
|
22
|
+
group: 'inline',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
marks: {},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.getDateSpec = getDateSpec;
|
|
29
|
+
function getTimeSpec() {
|
|
30
|
+
return {
|
|
31
|
+
topNode: 'paragraph',
|
|
32
|
+
nodes: {
|
|
33
|
+
paragraph: {
|
|
34
|
+
content: 'time',
|
|
35
|
+
},
|
|
36
|
+
time: {
|
|
37
|
+
content: 'inline*',
|
|
38
|
+
group: 'block',
|
|
39
|
+
parseDOM: [{ tag: 'span' }],
|
|
40
|
+
toDOM() {
|
|
41
|
+
return ['span', 0];
|
|
42
|
+
},
|
|
43
|
+
regexp: '[0-9]',
|
|
44
|
+
mask: '--:--:--',
|
|
45
|
+
},
|
|
46
|
+
text: {
|
|
47
|
+
group: 'inline',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
marks: {},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.getTimeSpec = getTimeSpec;
|
|
54
|
+
function getDateTimeSpec() {
|
|
55
|
+
return {
|
|
56
|
+
topNode: 'paragraph',
|
|
57
|
+
nodes: {
|
|
58
|
+
paragraph: {
|
|
59
|
+
content: 'date time',
|
|
60
|
+
},
|
|
61
|
+
date: {
|
|
62
|
+
content: 'inline*',
|
|
63
|
+
group: 'block',
|
|
64
|
+
parseDOM: [{ tag: 'span' }],
|
|
65
|
+
toDOM() {
|
|
66
|
+
return ['span', { class: 'date' }, 0];
|
|
67
|
+
},
|
|
68
|
+
regexp: '[0-9]',
|
|
69
|
+
mask: '--/--/----',
|
|
70
|
+
},
|
|
71
|
+
time: {
|
|
72
|
+
content: 'inline*',
|
|
73
|
+
group: 'block',
|
|
74
|
+
parseDOM: [{ tag: 'span' }],
|
|
75
|
+
toDOM() {
|
|
76
|
+
return ['span', { class: 'time' }, 0];
|
|
77
|
+
},
|
|
78
|
+
regexp: '[0-9]',
|
|
79
|
+
mask: '--:--:--',
|
|
80
|
+
},
|
|
81
|
+
text: {
|
|
82
|
+
group: 'inline',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
marks: {},
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
exports.getDateTimeSpec = getDateTimeSpec;
|
|
89
|
+
//# sourceMappingURL=date-time-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-schema.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/schema/date-time-schema.ts"],"names":[],"mappings":";;;AAMA,SAAgB,WAAW;IAC1B,OAAO;QACN,OAAO,EAAE,WAAW;QACpB,KAA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AE,EAAE,CAAC,CAAC,CAAA;gBACtC,CAAC;gBACD,MAAM,EAAE,OAAO;gBACf,IAAI,EAAE,YAAY;aAClB;YAED,IAAI,EAAE;gBACL,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;gBAC3B,KAAK;oBACJ,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAA;gBACtC,CAAC;gBACD,MAAM,EAAE,OAAO;gBACf,IAAI,EAAE,UAAU;aAChB;YAED,IAAI,EAAE;gBACL,KAAK,EAAE,QAAQ;aACf;SACD;QACD,KAAK,EAAE,EAAE;KACT,CAAA;AACF,CAAC;AApCD,0CAoCC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDecimalSpec = void 0;
|
|
4
|
+
function getDecimalSpec() {
|
|
5
|
+
return {
|
|
6
|
+
topNode: 'paragraph',
|
|
7
|
+
nodes: {
|
|
8
|
+
paragraph: {
|
|
9
|
+
content: 'decimal',
|
|
10
|
+
},
|
|
11
|
+
decimal: {
|
|
12
|
+
content: 'inline*',
|
|
13
|
+
group: 'block',
|
|
14
|
+
parseDOM: [{ tag: 'span' }],
|
|
15
|
+
toDOM() {
|
|
16
|
+
return ['span', 0];
|
|
17
|
+
},
|
|
18
|
+
regexp: '[,. 0-9-]',
|
|
19
|
+
},
|
|
20
|
+
text: {
|
|
21
|
+
group: 'inline',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
marks: {},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.getDecimalSpec = getDecimalSpec;
|
|
28
|
+
//# sourceMappingURL=decimal-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decimal-schema.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/schema/decimal-schema.ts"],"names":[],"mappings":";;;AAIA,SAAgB,cAAc;IAC7B,OAAO;QACN,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE;YACN,SAAS,EAAE;gBACV,OAAO,EAAE,SAAS;aAClB;YAED,OAAO,EAAE;gBACR,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;gBAC3B,KAAK;oBACJ,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;gBACnB,CAAC;gBACD,MAAM,EAAE,WAAW;aACnB;YAED,IAAI,EAAE;gBACL,KAAK,EAAE,QAAQ;aACf;SACD;QACD,KAAK,EAAE,EAAE;KACT,CAAA;AACF,CAAC;AAxBD,wCAwBC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Schema } from 'prosemirror-model';
|
|
2
|
+
import { DocumentSchema, InlineSchema, StyledSchema } from './markdown-schema';
|
|
3
|
+
import { DateSchema, DateTimeSchema, TimeSchema } from './date-time-schema';
|
|
4
|
+
import { TokensSchema } from './token-schema';
|
|
5
|
+
import { MeasureSchema } from './measure-schema';
|
|
6
|
+
import { DecimalSchema } from './decimal-schema';
|
|
7
|
+
export declare type IqrTextFieldSchema = DocumentSchema | TokensSchema | StyledSchema | InlineSchema | DateSchema | TimeSchema | DateTimeSchema | DecimalSchema | MeasureSchema;
|
|
8
|
+
export declare function createSchema(type: IqrTextFieldSchema, colorProvider: (type: string, code: string, isCode: boolean) => string, contentProvider: (codes: {
|
|
9
|
+
type: string;
|
|
10
|
+
code: string;
|
|
11
|
+
}[]) => string): Schema;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSchema = void 0;
|
|
4
|
+
const prosemirror_model_1 = require("prosemirror-model");
|
|
5
|
+
const markdown_schema_1 = require("./markdown-schema");
|
|
6
|
+
const date_time_schema_1 = require("./date-time-schema");
|
|
7
|
+
const token_schema_1 = require("./token-schema");
|
|
8
|
+
const measure_schema_1 = require("./measure-schema");
|
|
9
|
+
const decimal_schema_1 = require("./decimal-schema");
|
|
10
|
+
function createSchema(type, colorProvider, contentProvider) {
|
|
11
|
+
return new prosemirror_model_1.Schema(type === 'decimal'
|
|
12
|
+
? (0, decimal_schema_1.getDecimalSpec)()
|
|
13
|
+
: type === 'measure'
|
|
14
|
+
? (0, measure_schema_1.getMeasureSpec)()
|
|
15
|
+
: type === 'date'
|
|
16
|
+
? (0, date_time_schema_1.getDateSpec)()
|
|
17
|
+
: type === 'time'
|
|
18
|
+
? (0, date_time_schema_1.getTimeSpec)()
|
|
19
|
+
: type === 'date-time'
|
|
20
|
+
? (0, date_time_schema_1.getDateTimeSpec)()
|
|
21
|
+
: type === 'tokens-list' || type === 'styled-tokens-list' || type === 'tokens-list-with-codes' || type === 'styled-tokens-list-with-codes'
|
|
22
|
+
? (0, token_schema_1.getTokensSpec)(type, contentProvider, colorProvider)
|
|
23
|
+
: (0, markdown_schema_1.getMarkdownSpec)(type, contentProvider, colorProvider));
|
|
24
|
+
}
|
|
25
|
+
exports.createSchema = createSchema;
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/schema/index.ts"],"names":[],"mappings":";;;AAAA,yDAA0C;AAC1C,uDAA+F;AAC/F,yDAAsH;AACtH,iDAA4D;AAC5D,qDAAgE;AAChE,qDAAgE;AAIhE,SAAgB,YAAY,CAC3B,IAAwB,EACxB,aAAsE,EACtE,eAAoE;IAEpE,OAAO,IAAI,0BAAM,CAChB,IAAI,KAAK,SAAS;QACjB,CAAC,CAAC,IAAA,+BAAc,GAAE;QAClB,CAAC,CAAC,IAAI,KAAK,SAAS;YACpB,CAAC,CAAC,IAAA,+BAAc,GAAE;YAClB,CAAC,CAAC,IAAI,KAAK,MAAM;gBACjB,CAAC,CAAC,IAAA,8BAAW,GAAE;gBACf,CAAC,CAAC,IAAI,KAAK,MAAM;oBACjB,CAAC,CAAC,IAAA,8BAAW,GAAE;oBACf,CAAC,CAAC,IAAI,KAAK,WAAW;wBACtB,CAAC,CAAC,IAAA,kCAAe,GAAE;wBACnB,CAAC,CAAC,IAAI,KAAK,aAAa,IAAI,IAAI,KAAK,oBAAoB,IAAI,IAAI,KAAK,wBAAwB,IAAI,IAAI,KAAK,+BAA+B;4BAC1I,CAAC,CAAC,IAAA,4BAAa,EAAC,IAAI,EAAE,eAAe,EAAE,aAAa,CAAC;4BACrD,CAAC,CAAC,IAAA,iCAAe,EAAC,IAAI,EAAE,eAAe,EAAE,aAAa,CAAC,CACxD,CAAA;AACF,CAAC;AApBD,oCAoBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SchemaSpec } from 'prosemirror-model';
|
|
2
|
+
export declare type DocumentSchema = 'text-document';
|
|
3
|
+
export declare type InlineSchema = 'styled-text' | 'text' | 'text-with-codes' | 'styled-text-with-codes';
|
|
4
|
+
export declare type StyledSchema = 'text-document' | 'styled-text' | 'styled-text-with-codes';
|
|
5
|
+
export declare function getMarkdownSpec(type: DocumentSchema | InlineSchema, contentProvider: (codes: {
|
|
6
|
+
type: string;
|
|
7
|
+
code: string;
|
|
8
|
+
}[]) => string, colorProvider: (type: string, code: string, isCode: boolean) => string): SchemaSpec;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMarkdownSpec = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
const common_marks_1 = require("./common-marks");
|
|
6
|
+
function getMarkdownSpec(type, contentProvider, colorProvider) {
|
|
7
|
+
const nodesSelector = (key, spec) => {
|
|
8
|
+
// noinspection RedundantConditionalExpressionJS
|
|
9
|
+
return key === 'paragraph' ? true : (spec.group === 'block' || ['doc', 'list_item', 'hard_break', 'image'].includes(key)) && type !== 'text-document' ? false : true;
|
|
10
|
+
};
|
|
11
|
+
const marksSelector = (key) => {
|
|
12
|
+
// noinspection RedundantConditionalExpressionJS
|
|
13
|
+
return key !== 'link' && ['text-document', 'styled-text', 'styled-text-with-codes'].includes(type)
|
|
14
|
+
? true
|
|
15
|
+
: key === 'link' && ['text-document', 'text-with-codes', 'styled-text-with-codes']
|
|
16
|
+
? true
|
|
17
|
+
: false;
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
topNode: type === 'text-document' ? 'doc' : 'paragraph',
|
|
21
|
+
nodes: (0, utils_1.reduceNodes)({
|
|
22
|
+
doc: {
|
|
23
|
+
content: 'block+',
|
|
24
|
+
},
|
|
25
|
+
paragraph: {
|
|
26
|
+
content: 'inline*',
|
|
27
|
+
group: 'block',
|
|
28
|
+
parseDOM: [{ tag: 'p' }],
|
|
29
|
+
toDOM() {
|
|
30
|
+
return ['p', 0];
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
blockquote: {
|
|
34
|
+
content: 'block+',
|
|
35
|
+
group: 'block',
|
|
36
|
+
parseDOM: [{ tag: 'blockquote' }],
|
|
37
|
+
toDOM() {
|
|
38
|
+
return ['blockquote', 0];
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
horizontal_rule: {
|
|
42
|
+
group: 'block',
|
|
43
|
+
parseDOM: [{ tag: 'hr' }],
|
|
44
|
+
toDOM() {
|
|
45
|
+
return ['div', ['hr']];
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
heading: {
|
|
49
|
+
attrs: { level: { default: 1 } },
|
|
50
|
+
content: '(text | image)*',
|
|
51
|
+
group: 'block',
|
|
52
|
+
defining: true,
|
|
53
|
+
parseDOM: [
|
|
54
|
+
{ tag: 'h1', attrs: { level: 1 } },
|
|
55
|
+
{ tag: 'h2', attrs: { level: 2 } },
|
|
56
|
+
{ tag: 'h3', attrs: { level: 3 } },
|
|
57
|
+
{ tag: 'h4', attrs: { level: 4 } },
|
|
58
|
+
{ tag: 'h5', attrs: { level: 5 } },
|
|
59
|
+
{ tag: 'h6', attrs: { level: 6 } },
|
|
60
|
+
],
|
|
61
|
+
toDOM(node) {
|
|
62
|
+
return ['h' + node.attrs.level, 0];
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
ordered_list: {
|
|
66
|
+
content: 'list_item+',
|
|
67
|
+
group: 'block',
|
|
68
|
+
attrs: { order: { default: 1 }, tight: { default: false } },
|
|
69
|
+
parseDOM: [
|
|
70
|
+
{
|
|
71
|
+
tag: 'ol',
|
|
72
|
+
getAttrs(dom) {
|
|
73
|
+
const el = dom;
|
|
74
|
+
return {
|
|
75
|
+
order: el.hasAttribute('start') ? +(el.getAttribute('start') || 0) : 1,
|
|
76
|
+
tight: el.hasAttribute('data-tight'),
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
toDOM(node) {
|
|
82
|
+
return [
|
|
83
|
+
'ol',
|
|
84
|
+
{
|
|
85
|
+
start: node.attrs.order === 1 ? null : node.attrs.order,
|
|
86
|
+
'data-tight': node.attrs.tight ? 'true' : null,
|
|
87
|
+
},
|
|
88
|
+
0,
|
|
89
|
+
];
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
bullet_list: {
|
|
93
|
+
content: 'list_item+',
|
|
94
|
+
group: 'block',
|
|
95
|
+
attrs: { tight: { default: false } },
|
|
96
|
+
parseDOM: [{ tag: 'ul', getAttrs: (dom) => ({ tight: dom.hasAttribute('data-tight') }) }],
|
|
97
|
+
toDOM(node) {
|
|
98
|
+
return ['ul', { 'data-tight': node.attrs.tight ? 'true' : null }, 0];
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
list_item: {
|
|
102
|
+
content: 'paragraph block*',
|
|
103
|
+
defining: true,
|
|
104
|
+
parseDOM: [{ tag: 'li' }],
|
|
105
|
+
toDOM() {
|
|
106
|
+
return ['li', 0];
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
text: {
|
|
110
|
+
group: 'inline',
|
|
111
|
+
},
|
|
112
|
+
image: {
|
|
113
|
+
inline: true,
|
|
114
|
+
attrs: {
|
|
115
|
+
src: {},
|
|
116
|
+
alt: { default: null },
|
|
117
|
+
title: { default: null },
|
|
118
|
+
},
|
|
119
|
+
group: 'inline',
|
|
120
|
+
draggable: true,
|
|
121
|
+
parseDOM: [
|
|
122
|
+
{
|
|
123
|
+
tag: 'img[src]',
|
|
124
|
+
getAttrs(dom) {
|
|
125
|
+
const el = dom;
|
|
126
|
+
return {
|
|
127
|
+
src: el.getAttribute('src'),
|
|
128
|
+
title: el.getAttribute('title'),
|
|
129
|
+
alt: el.getAttribute('alt'),
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
toDOM(node) {
|
|
135
|
+
return ['img', node.attrs];
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
measure: {
|
|
139
|
+
content: 'decimal unit',
|
|
140
|
+
group: 'block',
|
|
141
|
+
},
|
|
142
|
+
decimal: {
|
|
143
|
+
content: 'inline*',
|
|
144
|
+
group: 'block',
|
|
145
|
+
parseDOM: [{ tag: 'span' }],
|
|
146
|
+
toDOM() {
|
|
147
|
+
return ['span', { class: 'measure' }, 0];
|
|
148
|
+
},
|
|
149
|
+
regexp: '[,.0-9-]',
|
|
150
|
+
},
|
|
151
|
+
unit: {
|
|
152
|
+
content: 'inline*',
|
|
153
|
+
group: 'block',
|
|
154
|
+
parseDOM: [{ tag: 'span' }],
|
|
155
|
+
toDOM() {
|
|
156
|
+
return ['span', { class: 'unit' }, 0];
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
hard_break: {
|
|
160
|
+
inline: true,
|
|
161
|
+
group: 'inline',
|
|
162
|
+
selectable: false,
|
|
163
|
+
parseDOM: [{ tag: 'br' }],
|
|
164
|
+
toDOM() {
|
|
165
|
+
return ['br'];
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
}, nodesSelector),
|
|
169
|
+
marks: (0, utils_1.reduceMarks)((0, common_marks_1.getMarks)(contentProvider, colorProvider), marksSelector),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
exports.getMarkdownSpec = getMarkdownSpec;
|
|
173
|
+
//# sourceMappingURL=markdown-schema.js.map
|