@wix/patterns-fields 1.55.0 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/address/input/address-input.st.css.js +3 -3
- package/dist/cjs/components/address/input/address-input.st.css.js.map +1 -1
- package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js +3 -3
- package/dist/cjs/components/audio/actions/actions-menu/actions-menu.st.css.js.map +1 -1
- package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js +4 -4
- package/dist/cjs/components/audio/audio-field/form-audio-field.st.css.js.map +1 -1
- package/dist/cjs/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/cjs/components/audio/audio-player/audio-player.st.css.js.map +1 -1
- package/dist/cjs/components/color-view/cell-color-view.st.css.js +3 -3
- package/dist/cjs/components/color-view/cell-color-view.st.css.js.map +1 -1
- package/dist/cjs/components/color-view/color-view.st.css.js +4 -4
- package/dist/cjs/components/color-view/color-view.st.css.js.map +1 -1
- package/dist/cjs/components/date-input/form-date-input.js +7 -5
- package/dist/cjs/components/date-input/form-date-input.js.map +1 -1
- package/dist/cjs/components/datetime-input/form-date-time.js +11 -9
- package/dist/cjs/components/datetime-input/form-date-time.js.map +1 -1
- package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js +3 -3
- package/dist/cjs/components/delete-dialog/delete-dialog.st.css.js.map +1 -1
- package/dist/cjs/components/document/form-document-field.st.css.js +7 -7
- package/dist/cjs/components/document/form-document-field.st.css.js.map +1 -1
- package/dist/cjs/components/exclamation/exclamation.st.css.js +5 -5
- package/dist/cjs/components/exclamation/exclamation.st.css.js.map +1 -1
- package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js +5 -5
- package/dist/cjs/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
- package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js +3 -3
- package/dist/cjs/components/image/thumbnail-replace-overlay.st.css.js.map +1 -1
- package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js +2 -2
- package/dist/cjs/components/media-control/cell-media-edit-shell.st.css.js.map +1 -1
- package/dist/cjs/components/media-control/paste-url-button.st.css.js +4 -4
- package/dist/cjs/components/media-control/paste-url-button.st.css.js.map +1 -1
- package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js +10 -10
- package/dist/cjs/components/media-gallery/form-media-gallery-field.st.css.js.map +1 -1
- package/dist/cjs/components/media-image/media-image.st.css.js +4 -4
- package/dist/cjs/components/media-image/media-image.st.css.js.map +1 -1
- package/dist/cjs/components/media-image/overlays/overlay.st.css.js +3 -3
- package/dist/cjs/components/media-image/overlays/overlay.st.css.js.map +1 -1
- package/dist/cjs/components/media-loader/media-loader.st.css.js +3 -3
- package/dist/cjs/components/media-loader/media-loader.st.css.js.map +1 -1
- package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
- package/dist/cjs/components/media-tag/web-media-tag/media-tag.st.css.js.map +1 -1
- package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js +3 -3
- package/dist/cjs/components/multi-document/cell-multi-document-edit.st.css.js.map +1 -1
- package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js +5 -5
- package/dist/cjs/components/multi-document/multi-document-input/form-multi-document.st.css.js.map +1 -1
- package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js +2 -2
- package/dist/cjs/components/reference/cell-multi-reference-input.st.css.js.map +1 -1
- package/dist/cjs/components/reference/cell-reference-input.st.css.js +3 -3
- package/dist/cjs/components/reference/cell-reference-input.st.css.js.map +1 -1
- package/dist/cjs/components/reference/form-multi-reference.js +174 -0
- package/dist/cjs/components/reference/form-multi-reference.js.map +1 -0
- package/dist/cjs/components/reference/form-reference.js +165 -0
- package/dist/cjs/components/reference/form-reference.js.map +1 -0
- package/dist/cjs/components/reference/index.js +12 -0
- package/dist/cjs/components/reference/index.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +4 -4
- package/dist/cjs/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
- package/dist/cjs/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +3 -3
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +7 -7
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +5 -5
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +4 -4
- package/dist/cjs/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +18 -18
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +4 -4
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js.map +1 -1
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +18 -18
- package/dist/cjs/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
- package/dist/cjs/components/text/text-view.st.css.js +3 -3
- package/dist/cjs/components/text/text-view.st.css.js.map +1 -1
- package/dist/cjs/components/time-input/form-time-input.js +6 -4
- package/dist/cjs/components/time-input/form-time-input.js.map +1 -1
- package/dist/cjs/components/time-input/form-time.js +20 -5
- package/dist/cjs/components/time-input/form-time.js.map +1 -1
- package/dist/cjs/styles.global.css +1 -1
- package/dist/esm/components/address/input/address-input.st.css.js +2 -2
- package/dist/esm/components/audio/actions/actions-menu/actions-menu.st.css.js +2 -2
- package/dist/esm/components/audio/audio-field/form-audio-field.st.css.js +2 -2
- package/dist/esm/components/audio/audio-player/audio-player.st.css.js +2 -2
- package/dist/esm/components/audio/audio-player/audio-player.st.css.js.map +1 -1
- package/dist/esm/components/color-view/cell-color-view.st.css.js +2 -2
- package/dist/esm/components/color-view/color-view.st.css.js +2 -2
- package/dist/esm/components/color-view/color-view.st.css.js.map +1 -1
- package/dist/esm/components/date-input/form-date-input.js +6 -1
- package/dist/esm/components/date-input/form-date-input.js.map +1 -1
- package/dist/esm/components/datetime-input/form-date-time.js +8 -3
- package/dist/esm/components/datetime-input/form-date-time.js.map +1 -1
- package/dist/esm/components/delete-dialog/delete-dialog.st.css.js +2 -2
- package/dist/esm/components/document/form-document-field.st.css.js +2 -2
- package/dist/esm/components/document/form-document-field.st.css.js.map +1 -1
- package/dist/esm/components/exclamation/exclamation.st.css.js +2 -2
- package/dist/esm/components/exclamation/exclamation.st.css.js.map +1 -1
- package/dist/esm/components/highlighted-text/highlighted-text.st.css.js +3 -3
- package/dist/esm/components/highlighted-text/highlighted-text.st.css.js.map +1 -1
- package/dist/esm/components/image/thumbnail-replace-overlay.st.css.js +2 -2
- package/dist/esm/components/media-control/cell-media-edit-shell.st.css.js +2 -2
- package/dist/esm/components/media-control/paste-url-button.st.css.js +2 -2
- package/dist/esm/components/media-control/paste-url-button.st.css.js.map +1 -1
- package/dist/esm/components/media-gallery/form-media-gallery-field.st.css.js +2 -2
- package/dist/esm/components/media-image/media-image.st.css.js +3 -3
- package/dist/esm/components/media-image/overlays/overlay.st.css.js +2 -2
- package/dist/esm/components/media-image/overlays/overlay.st.css.js.map +1 -1
- package/dist/esm/components/media-loader/media-loader.st.css.js +2 -2
- package/dist/esm/components/media-tag/web-media-tag/media-tag.st.css.js +2 -2
- package/dist/esm/components/multi-document/cell-multi-document-edit.st.css.js +2 -2
- package/dist/esm/components/multi-document/multi-document-input/form-multi-document.st.css.js +2 -2
- package/dist/esm/components/reference/cell-multi-reference-input.st.css.js +2 -2
- package/dist/esm/components/reference/cell-reference-input.st.css.js +2 -2
- package/dist/esm/components/reference/form-multi-reference.js +85 -0
- package/dist/esm/components/reference/form-multi-reference.js.map +1 -0
- package/dist/esm/components/reference/form-reference.js +76 -0
- package/dist/esm/components/reference/form-reference.js.map +1 -0
- package/dist/esm/components/reference/index.js +2 -0
- package/dist/esm/components/reference/index.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js +2 -2
- package/dist/esm/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.js.map +1 -1
- package/dist/esm/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js +2 -2
- package/dist/esm/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.js.map +1 -1
- package/dist/esm/components/text/text-view.st.css.js +2 -2
- package/dist/esm/components/text/text-view.st.css.js.map +1 -1
- package/dist/esm/components/time-input/form-time-input.js +3 -2
- package/dist/esm/components/time-input/form-time-input.js.map +1 -1
- package/dist/esm/components/time-input/form-time.js +10 -2
- package/dist/esm/components/time-input/form-time.js.map +1 -1
- package/dist/esm/styles.global.css +1 -1
- package/dist/types/components/audio/audio-player/audio-player.st.css.d.ts.map +1 -1
- package/dist/types/components/color-view/color-view.st.css.d.ts.map +1 -1
- package/dist/types/components/date-input/form-date-input.d.ts.map +1 -1
- package/dist/types/components/datetime-input/form-date-time.d.ts.map +1 -1
- package/dist/types/components/document/form-document-field.st.css.d.ts.map +1 -1
- package/dist/types/components/exclamation/exclamation.st.css.d.ts.map +1 -1
- package/dist/types/components/highlighted-text/highlighted-text.st.css.d.ts.map +1 -1
- package/dist/types/components/media-control/paste-url-button.st.css.d.ts.map +1 -1
- package/dist/types/components/media-image/overlays/overlay.st.css.d.ts.map +1 -1
- package/dist/types/components/reference/form-multi-reference.d.ts +28 -0
- package/dist/types/components/reference/form-multi-reference.d.ts.map +1 -0
- package/dist/types/components/reference/form-reference.d.ts +32 -0
- package/dist/types/components/reference/form-reference.d.ts.map +1 -0
- package/dist/types/components/reference/index.d.ts +2 -0
- package/dist/types/components/reference/index.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.d.ts.map +1 -1
- package/dist/types/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.d.ts.map +1 -1
- package/dist/types/components/text/text-view.st.css.d.ts.map +1 -1
- package/dist/types/components/time-input/form-time-input.d.ts +6 -1
- package/dist/types/components/time-input/form-time-input.d.ts.map +1 -1
- package/dist/types/components/time-input/form-time.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/components/date-input/form-date-input.spec.tsx +15 -0
- package/src/__tests__/components/datetime-input/form-date-time.spec.tsx +15 -0
- package/src/__tests__/components/reference/form-multi-reference.spec.tsx +153 -0
- package/src/__tests__/components/reference/form-reference.spec.tsx +158 -0
- package/src/__tests__/components/time-input/form-time.spec.tsx +16 -0
- package/src/components/address/input/address-input.st.css.ts +2 -2
- package/src/components/audio/actions/actions-menu/actions-menu.st.css.ts +2 -2
- package/src/components/audio/audio-field/form-audio-field.st.css.ts +2 -2
- package/src/components/audio/audio-player/audio-player.st.css.ts +2 -2
- package/src/components/color-view/cell-color-view.st.css.ts +2 -2
- package/src/components/color-view/color-view.st.css.ts +2 -2
- package/src/components/date-input/form-date-input.tsx +7 -2
- package/src/components/datetime-input/form-date-time.tsx +8 -3
- package/src/components/delete-dialog/delete-dialog.st.css.ts +2 -2
- package/src/components/document/form-document-field.st.css.ts +2 -2
- package/src/components/exclamation/exclamation.st.css.ts +2 -2
- package/src/components/highlighted-text/highlighted-text.st.css.ts +3 -3
- package/src/components/image/thumbnail-replace-overlay.st.css.ts +2 -2
- package/src/components/media-control/cell-media-edit-shell.st.css.ts +2 -2
- package/src/components/media-control/paste-url-button.st.css.ts +2 -2
- package/src/components/media-gallery/form-media-gallery-field.st.css.ts +2 -2
- package/src/components/media-image/media-image.st.css.ts +3 -3
- package/src/components/media-image/overlays/overlay.st.css.ts +2 -2
- package/src/components/media-loader/media-loader.st.css.ts +2 -2
- package/src/components/media-tag/web-media-tag/media-tag.st.css.ts +2 -2
- package/src/components/multi-document/cell-multi-document-edit.st.css.ts +2 -2
- package/src/components/multi-document/multi-document-input/form-multi-document.st.css.ts +2 -2
- package/src/components/reference/cell-multi-reference-input.st.css.ts +2 -2
- package/src/components/reference/cell-reference-input.st.css.ts +2 -2
- package/src/components/reference/form-multi-reference.tsx +212 -0
- package/src/components/reference/form-reference.tsx +186 -0
- package/src/components/reference/index.ts +2 -0
- package/src/components/rich-content/rich-content-input/default-value-input/rich-content-default-value-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/form-read-only-input/rich-content-form-read-only-input.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/fullscreen-modal/fullscreen-modal.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/publish-loader/publish-loader.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-common/toggle-fullscreen-button/toggle-fullscreen-button.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-editor.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-editor/rich-content-toolbar.st.css.ts +2 -2
- package/src/components/rich-content/rich-content-input/rich-content-viewer/rich-content-viewer.st.css.ts +2 -2
- package/src/components/rich-text/rich-text-input/rich-text-editor/rich-editor.st.css.ts +2 -2
- package/src/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.ts +2 -2
- package/src/components/rich-text/rich-text-input/rich-text-editor/toolbar/toolbar.st.css.ts +2 -2
- package/src/components/text/text-view.st.css.ts +2 -2
- package/src/components/time-input/form-time-input.tsx +7 -2
- package/src/components/time-input/form-time.tsx +12 -1
- package/src/styles.global.css +1 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
FormField,
|
|
5
|
+
MultiSelect,
|
|
6
|
+
listItemSelectBuilder,
|
|
7
|
+
type DropdownLayoutValueOption,
|
|
8
|
+
type MultiSelectTag,
|
|
9
|
+
} from '@wix/design-system';
|
|
10
|
+
import { observer } from 'mobx-react-lite';
|
|
11
|
+
import { useWixPatternsContainer } from '@wix/bex-core/react';
|
|
12
|
+
import { useController } from '@wix/bex-core/form';
|
|
13
|
+
|
|
14
|
+
import { BaseInputProps } from '../../types/base-input';
|
|
15
|
+
import { useTranslations } from '../../hooks/use-translations';
|
|
16
|
+
import { ReferenceAvatar } from './reference-avatar';
|
|
17
|
+
import type { FormReferenceItem } from './form-reference';
|
|
18
|
+
|
|
19
|
+
/** Selected references, each stored as `{ [idField], [displayField] }`. */
|
|
20
|
+
export type FormMultiReferenceValue = Record<string, unknown>[] | null;
|
|
21
|
+
|
|
22
|
+
// Data-agnostic like CellMultiReferenceInput: the caller owns fetching, search,
|
|
23
|
+
// and pagination and passes the results in as props. This renderer only wraps
|
|
24
|
+
// them in a FormField with react-hook-form wiring. See remaining-issues.md #2.
|
|
25
|
+
export interface FormMultiReferenceProps
|
|
26
|
+
extends BaseInputProps<FormMultiReferenceValue> {
|
|
27
|
+
/** Candidate items for the dropdown. */
|
|
28
|
+
items: FormReferenceItem[];
|
|
29
|
+
/** Referenced-item field the selected id is written to. */
|
|
30
|
+
idField: string;
|
|
31
|
+
/** Referenced-item field used as the tag label. */
|
|
32
|
+
displayField: string;
|
|
33
|
+
/** Referenced-item field holding an avatar image, when the schema has one. */
|
|
34
|
+
imageField?: string;
|
|
35
|
+
/** Current search text. The caller owns search state. */
|
|
36
|
+
searchValue?: string;
|
|
37
|
+
onSearch: (query: string) => void;
|
|
38
|
+
onClearSearch?: () => void;
|
|
39
|
+
hasMore?: boolean;
|
|
40
|
+
loadMore?: () => void;
|
|
41
|
+
fixedFooter?: React.ReactNode;
|
|
42
|
+
onOpenCollection?: () => void;
|
|
43
|
+
placeholder?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const _FormMultiReference = (props: FormMultiReferenceProps) => {
|
|
47
|
+
const {
|
|
48
|
+
field,
|
|
49
|
+
dataHook,
|
|
50
|
+
formControl,
|
|
51
|
+
data,
|
|
52
|
+
items,
|
|
53
|
+
idField,
|
|
54
|
+
displayField,
|
|
55
|
+
imageField,
|
|
56
|
+
searchValue,
|
|
57
|
+
onSearch,
|
|
58
|
+
onClearSearch,
|
|
59
|
+
hasMore,
|
|
60
|
+
loadMore,
|
|
61
|
+
fixedFooter,
|
|
62
|
+
placeholder,
|
|
63
|
+
} = props;
|
|
64
|
+
|
|
65
|
+
const { translate: t } = useWixPatternsContainer();
|
|
66
|
+
const { t: tf } = useTranslations();
|
|
67
|
+
|
|
68
|
+
const controller = useController({
|
|
69
|
+
name: field.id,
|
|
70
|
+
control: formControl,
|
|
71
|
+
defaultValue: data?.[field.id],
|
|
72
|
+
rules: {
|
|
73
|
+
validate: (value) => {
|
|
74
|
+
const arr = value as FormMultiReferenceValue;
|
|
75
|
+
if (field.validation?.required && (!arr || !arr.length)) {
|
|
76
|
+
return t('cairo.fieldValidation.requiredField');
|
|
77
|
+
}
|
|
78
|
+
return true;
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const selectedValues = useMemo(
|
|
84
|
+
() => (controller.field.value as Record<string, unknown>[]) || [],
|
|
85
|
+
[controller.field.value],
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
const tags = useMemo<MultiSelectTag[]>(
|
|
89
|
+
() =>
|
|
90
|
+
selectedValues.map((item) => {
|
|
91
|
+
const selectedId = item[idField] as string;
|
|
92
|
+
const label = item[displayField] as string;
|
|
93
|
+
const image = imageField
|
|
94
|
+
? (item[imageField] as string | undefined)
|
|
95
|
+
: undefined;
|
|
96
|
+
return {
|
|
97
|
+
id: selectedId,
|
|
98
|
+
label,
|
|
99
|
+
removable: true,
|
|
100
|
+
size: 'medium',
|
|
101
|
+
thumb: (
|
|
102
|
+
<Box
|
|
103
|
+
align="center"
|
|
104
|
+
verticalAlign="middle"
|
|
105
|
+
position="absolute"
|
|
106
|
+
top="calc(50% - 12px)"
|
|
107
|
+
left="calc(50% - 12px)"
|
|
108
|
+
>
|
|
109
|
+
<ReferenceAvatar name={label} image={image} />
|
|
110
|
+
</Box>
|
|
111
|
+
),
|
|
112
|
+
dataHook: `multi-reference-tag-${field.id}-${selectedId}`,
|
|
113
|
+
};
|
|
114
|
+
}),
|
|
115
|
+
[selectedValues, idField, displayField, imageField, field.id],
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const options = useMemo(
|
|
119
|
+
() =>
|
|
120
|
+
items.map((item) =>
|
|
121
|
+
listItemSelectBuilder({
|
|
122
|
+
id: item.id,
|
|
123
|
+
title: item.name || tf('patterns-fields.reference.untitled'),
|
|
124
|
+
prefix: <ReferenceAvatar name={item.name} image={item.image} />,
|
|
125
|
+
}),
|
|
126
|
+
),
|
|
127
|
+
[items, tf],
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
const handleSelect = useCallback(
|
|
131
|
+
(option: DropdownLayoutValueOption) => {
|
|
132
|
+
const selectedId = String(option.id);
|
|
133
|
+
if (selectedValues.some((item) => item[idField] === selectedId)) {
|
|
134
|
+
onClearSearch?.();
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const item = items.find((i) => i.id === selectedId);
|
|
138
|
+
controller.field.onChange([
|
|
139
|
+
...selectedValues,
|
|
140
|
+
{ [idField]: selectedId, [displayField]: item?.name || '' },
|
|
141
|
+
]);
|
|
142
|
+
onClearSearch?.();
|
|
143
|
+
},
|
|
144
|
+
[
|
|
145
|
+
selectedValues,
|
|
146
|
+
items,
|
|
147
|
+
idField,
|
|
148
|
+
displayField,
|
|
149
|
+
controller.field,
|
|
150
|
+
onClearSearch,
|
|
151
|
+
],
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
const handleRemoveTag = useCallback(
|
|
155
|
+
(tagId: string) => {
|
|
156
|
+
controller.field.onChange(
|
|
157
|
+
selectedValues.filter((item) => item[idField] !== tagId),
|
|
158
|
+
);
|
|
159
|
+
},
|
|
160
|
+
[controller.field, selectedValues, idField],
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
const handleChange = useCallback(
|
|
164
|
+
(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
165
|
+
onSearch(e.target.value);
|
|
166
|
+
},
|
|
167
|
+
[onSearch],
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
const handleClear = useCallback(() => {
|
|
171
|
+
controller.field.onChange([]);
|
|
172
|
+
onClearSearch?.();
|
|
173
|
+
}, [controller.field, onClearSearch]);
|
|
174
|
+
|
|
175
|
+
const handleBlur = useCallback(() => {
|
|
176
|
+
onClearSearch?.();
|
|
177
|
+
}, [onClearSearch]);
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
<FormField
|
|
181
|
+
label={field.displayName}
|
|
182
|
+
required={field.validation?.required}
|
|
183
|
+
status={controller.fieldState.error ? 'error' : undefined}
|
|
184
|
+
statusMessage={controller.fieldState.error?.message}
|
|
185
|
+
dataHook={dataHook}
|
|
186
|
+
>
|
|
187
|
+
<MultiSelect
|
|
188
|
+
placeholder={
|
|
189
|
+
placeholder ?? tf('auto-patterns.fields.select_placeholder')
|
|
190
|
+
}
|
|
191
|
+
options={options}
|
|
192
|
+
value={searchValue ?? ''}
|
|
193
|
+
size="large"
|
|
194
|
+
tags={tags}
|
|
195
|
+
clearOnBlur={false}
|
|
196
|
+
onChange={handleChange}
|
|
197
|
+
onSelect={handleSelect}
|
|
198
|
+
onRemoveTag={handleRemoveTag}
|
|
199
|
+
onClear={handleClear}
|
|
200
|
+
onBlur={handleBlur}
|
|
201
|
+
clearButton={!field.validation?.required}
|
|
202
|
+
infiniteScroll={!!loadMore}
|
|
203
|
+
hasMore={hasMore}
|
|
204
|
+
loadMore={loadMore}
|
|
205
|
+
fixedFooter={fixedFooter}
|
|
206
|
+
dataHook={`multi-reference-input-${field.id}`}
|
|
207
|
+
/>
|
|
208
|
+
</FormField>
|
|
209
|
+
);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export const FormMultiReference = observer(_FormMultiReference);
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
AutoComplete,
|
|
4
|
+
FormField,
|
|
5
|
+
Input,
|
|
6
|
+
listItemSelectBuilder,
|
|
7
|
+
type DropdownLayoutValueOption,
|
|
8
|
+
} from '@wix/design-system';
|
|
9
|
+
import { observer } from 'mobx-react-lite';
|
|
10
|
+
import { useWixPatternsContainer } from '@wix/bex-core/react';
|
|
11
|
+
import { useController } from '@wix/bex-core/form';
|
|
12
|
+
|
|
13
|
+
import { BaseInputProps } from '../../types/base-input';
|
|
14
|
+
import { useTranslations } from '../../hooks/use-translations';
|
|
15
|
+
import { ReferenceAvatar } from './reference-avatar';
|
|
16
|
+
|
|
17
|
+
export interface FormReferenceItem {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
image?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** The selected reference, stored on the form as `{ [idField], [displayField] }`. */
|
|
24
|
+
export type FormReferenceValue = Record<string, unknown> | null;
|
|
25
|
+
|
|
26
|
+
// Data-agnostic like CellReferenceInput: the caller owns fetching, search, and
|
|
27
|
+
// pagination and passes the results in as props. This renderer only wraps them
|
|
28
|
+
// in a FormField with react-hook-form wiring. See remaining-issues.md #2.
|
|
29
|
+
export interface FormReferenceProps extends BaseInputProps<FormReferenceValue> {
|
|
30
|
+
/** Candidate items for the dropdown. */
|
|
31
|
+
items: FormReferenceItem[];
|
|
32
|
+
/** Referenced-item field the selected id is written to. */
|
|
33
|
+
idField: string;
|
|
34
|
+
/** Referenced-item field used as the display label. */
|
|
35
|
+
displayField: string;
|
|
36
|
+
/** Referenced-item field holding an avatar image, when the schema has one. */
|
|
37
|
+
imageField?: string;
|
|
38
|
+
/** Current search text. Empty ⇒ show the selected item's label. */
|
|
39
|
+
searchValue?: string;
|
|
40
|
+
onSearch: (query: string) => void;
|
|
41
|
+
onClearSearch?: () => void;
|
|
42
|
+
hasMore?: boolean;
|
|
43
|
+
loadMore?: () => void;
|
|
44
|
+
fixedFooter?: React.ReactNode;
|
|
45
|
+
onOpenCollection?: () => void;
|
|
46
|
+
placeholder?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const _FormReference = (props: FormReferenceProps) => {
|
|
50
|
+
const {
|
|
51
|
+
field,
|
|
52
|
+
dataHook,
|
|
53
|
+
formControl,
|
|
54
|
+
data,
|
|
55
|
+
items,
|
|
56
|
+
idField,
|
|
57
|
+
displayField,
|
|
58
|
+
imageField,
|
|
59
|
+
searchValue,
|
|
60
|
+
onSearch,
|
|
61
|
+
onClearSearch,
|
|
62
|
+
hasMore,
|
|
63
|
+
loadMore,
|
|
64
|
+
fixedFooter,
|
|
65
|
+
placeholder,
|
|
66
|
+
} = props;
|
|
67
|
+
|
|
68
|
+
const { translate: t } = useWixPatternsContainer();
|
|
69
|
+
const { t: tf } = useTranslations();
|
|
70
|
+
|
|
71
|
+
const controller = useController({
|
|
72
|
+
name: field.id,
|
|
73
|
+
control: formControl,
|
|
74
|
+
defaultValue: data?.[field.id],
|
|
75
|
+
rules: {
|
|
76
|
+
validate: (value) => {
|
|
77
|
+
if (field.validation?.required && !value) {
|
|
78
|
+
return t('cairo.fieldValidation.requiredField');
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const selectedValue = controller.field.value as FormReferenceValue;
|
|
86
|
+
const selectedDisplayValue = (selectedValue?.[displayField] as string) || '';
|
|
87
|
+
const displayValue = searchValue || selectedDisplayValue;
|
|
88
|
+
|
|
89
|
+
const selectedImage = useMemo(() => {
|
|
90
|
+
const selectedId = selectedValue?.[idField];
|
|
91
|
+
if (!selectedId) {
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
const found = items.find((item) => item.id === selectedId);
|
|
95
|
+
if (found?.image) {
|
|
96
|
+
return found.image;
|
|
97
|
+
}
|
|
98
|
+
return imageField
|
|
99
|
+
? (selectedValue?.[imageField] as string | undefined)
|
|
100
|
+
: undefined;
|
|
101
|
+
}, [selectedValue, idField, imageField, items]);
|
|
102
|
+
|
|
103
|
+
const options = useMemo(
|
|
104
|
+
() =>
|
|
105
|
+
items.map((item) =>
|
|
106
|
+
listItemSelectBuilder({
|
|
107
|
+
id: item.id,
|
|
108
|
+
title: item.name || tf('patterns-fields.reference.untitled'),
|
|
109
|
+
prefix: <ReferenceAvatar name={item.name} image={item.image} />,
|
|
110
|
+
}),
|
|
111
|
+
),
|
|
112
|
+
[items, tf],
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const selectedPrefix =
|
|
116
|
+
selectedDisplayValue && !searchValue ? (
|
|
117
|
+
<Input.Affix>
|
|
118
|
+
<ReferenceAvatar name={selectedDisplayValue} image={selectedImage} />
|
|
119
|
+
</Input.Affix>
|
|
120
|
+
) : undefined;
|
|
121
|
+
|
|
122
|
+
const handleSelect = useCallback(
|
|
123
|
+
(option: DropdownLayoutValueOption) => {
|
|
124
|
+
const item = items.find((i) => i.id === String(option.id));
|
|
125
|
+
controller.field.onChange({
|
|
126
|
+
[idField]: String(option.id),
|
|
127
|
+
[displayField]: item?.name || '',
|
|
128
|
+
});
|
|
129
|
+
onClearSearch?.();
|
|
130
|
+
},
|
|
131
|
+
[items, idField, displayField, controller.field, onClearSearch],
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
const handleChange = useCallback(
|
|
135
|
+
(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
136
|
+
onSearch(e.target.value);
|
|
137
|
+
if (!e.target.value) {
|
|
138
|
+
controller.field.onChange(null);
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
[onSearch, controller.field],
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
const handleClear = useCallback(() => {
|
|
145
|
+
controller.field.onChange(null);
|
|
146
|
+
onClearSearch?.();
|
|
147
|
+
}, [controller.field, onClearSearch]);
|
|
148
|
+
|
|
149
|
+
const handleBlur = useCallback(() => {
|
|
150
|
+
onClearSearch?.();
|
|
151
|
+
}, [onClearSearch]);
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<FormField
|
|
155
|
+
label={field.displayName}
|
|
156
|
+
required={field.validation?.required}
|
|
157
|
+
status={controller.fieldState.error ? 'error' : undefined}
|
|
158
|
+
statusMessage={controller.fieldState.error?.message}
|
|
159
|
+
dataHook={dataHook}
|
|
160
|
+
>
|
|
161
|
+
<AutoComplete
|
|
162
|
+
placeholder={
|
|
163
|
+
placeholder ?? tf('auto-patterns.fields.select_placeholder')
|
|
164
|
+
}
|
|
165
|
+
options={options}
|
|
166
|
+
value={displayValue}
|
|
167
|
+
prefix={selectedPrefix}
|
|
168
|
+
onChange={handleChange}
|
|
169
|
+
onSelect={handleSelect}
|
|
170
|
+
onClear={handleClear}
|
|
171
|
+
onBlur={handleBlur}
|
|
172
|
+
clearButton={!field.validation?.required}
|
|
173
|
+
infiniteScroll={!!loadMore}
|
|
174
|
+
hasMore={hasMore}
|
|
175
|
+
loadMore={loadMore}
|
|
176
|
+
fixedFooter={fixedFooter}
|
|
177
|
+
// Hand the input to react-hook-form so shouldFocusError scrolls to +
|
|
178
|
+
// focuses this field when it blocks save.
|
|
179
|
+
inputRef={controller.field.ref}
|
|
180
|
+
dataHook={`reference-input-${field.id}`}
|
|
181
|
+
/>
|
|
182
|
+
</FormField>
|
|
183
|
+
);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export const FormReference = observer(_FormReference);
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richcontentdefaultvalueinput443326018";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"richcontentdefaultvalueinput443326018__root","richContentEditorContainer":"richcontentdefaultvalueinput443326018__richContentEditorContainer","editor":"richcontentdefaultvalueinput443326018__editor"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
package/src/components/rich-content/rich-content-input/form-input/rich-content-form-input.st.css.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richcontentforminput3334825677";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"richcontentforminput3334825677__root","editor":"richcontentforminput3334825677__editor"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richcontentformreadonlyinput2425623005";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"richcontentformreadonlyinput2425623005__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../../stylable-esm-runti
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "fullscreenmodal1841647145";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"fullscreenmodal1841647145__root","modalContent":"fullscreenmodal1841647145__modalContent"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../../stylable-esm-runti
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "publishloader1701008763";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"publishloader1701008763__root","publishLoader":"publishloader1701008763__publishLoader"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../../stylable-esm-runti
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "togglefullscreenbutton3828783328";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"togglefullscreenbutton3828783328__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richcontenteditor1104792148";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"richcontenteditor1104792148__root","toolbarContainer":"richcontenteditor1104792148__toolbarContainer","footerToolbarContainer":"richcontenteditor1104792148__footerToolbarContainer","toolbarAndFullScreenButtonWrapper":"richcontenteditor1104792148__toolbarAndFullScreenButtonWrapper","editor":"richcontenteditor1104792148__editor","modalEditor":"richcontenteditor1104792148__modalEditor"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richcontenttoolbar1597960395";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"richcontenttoolbar1597960395__root","toolbar":"richcontenttoolbar1597960395__toolbar","toolbarButton":"richcontenttoolbar1597960395__toolbarButton","separator":"richcontenttoolbar1597960395__separator"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richcontentviewer3873042823";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"richcontentviewer3873042823__root","viewer":"richcontentviewer3873042823__viewer","modalViewer":"richcontentviewer3873042823__modalViewer"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richeditor1957756590";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"richeditor1957756590__root","editor":"richeditor1957756590__editor","header-one":"richeditor1957756590__header-one","header-two":"richeditor1957756590__header-two","header-three":"richeditor1957756590__header-three","header-four":"richeditor1957756590__header-four","header-five":"richeditor1957756590__header-five","header-six":"richeditor1957756590__header-six","paragraph-one":"richeditor1957756590__paragraph-one","unstyled":"richeditor1957756590__unstyled","paragraph-three":"richeditor1957756590__paragraph-three","align-left":"richeditor1957756590__align-left","align-right":"richeditor1957756590__align-right","align-center":"richeditor1957756590__align-center","align-justify":"richeditor1957756590__align-justify","withMargin":"richeditor1957756590__withMargin","dir-rtl":"richeditor1957756590__dir-rtl"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
package/src/components/rich-text/rich-text-input/rich-text-editor/rich-text-editor.st.css.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../stylable-esm-runtime.
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "richtexteditor2252892878";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"richtexteditor2252892878__root","nativeInput":"richtexteditor2252892878__nativeInput","editor":"richtexteditor2252892878__editor"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../../../../stylable-esm-runti
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "toolbar273985549";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"toolbar273985549__root","item":"toolbar273985549__item","separator":"toolbar273985549__separator","clearFormatting":"toolbar273985549__clearFormatting","fullScreen":"toolbar273985549__fullScreen","dropdownItemContent":"toolbar273985549__dropdownItemContent","dropdownItemTitle":"toolbar273985549__dropdownItemTitle","dropdownItemSubtitle":"toolbar273985549__dropdownItemSubtitle","dropdownHeaderOne":"toolbar273985549__dropdownHeaderOne","dropdownHeaderTwo":"toolbar273985549__dropdownHeaderTwo","dropdownHeaderThree":"toolbar273985549__dropdownHeaderThree","dropdownHeaderFour":"toolbar273985549__dropdownHeaderFour","dropdownHeaderFive":"toolbar273985549__dropdownHeaderFive","dropdownHeaderSix":"toolbar273985549__dropdownHeaderSix","dropdownParagraphOne":"toolbar273985549__dropdownParagraphOne","dropdownNormalText":"toolbar273985549__dropdownNormalText","dropdownParagraphThree":"toolbar273985549__dropdownParagraphThree"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "textview1813358791";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style: import("@stylable/runtime").STFunction = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"textview1813358791__root","textView":"textview1813358791__textView"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|