@webx-ui/module-catalog 0.3.0 → 0.5.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.
@@ -2,7 +2,9 @@ import { BulkActionInfo } from './types';
2
2
  /**
3
3
  * What a bulk action asks for before it runs — a category, a label — and the last word before it
4
4
  * does: how many products it is about to touch. The fields are drawn from what the server said
5
- * about the action, so a satellite's action gets its dialog without this file knowing it.
5
+ * about the action, so a satellite's action gets its dialog without this file knowing it: a
6
+ * param with a `source` is a choice out of that reference book (a label, a brand), and one that is
7
+ * not required says what choosing nothing does — for `set-brand`, take the brand off.
6
8
  */
7
9
  type __VLS_Props = {
8
10
  action: BulkActionInfo;
@@ -0,0 +1,6 @@
1
+ import { ColumnValue } from './types';
2
+ type __VLS_Props = {
3
+ value: ColumnValue | undefined;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ options?: Array<{
3
+ label: string;
4
+ value: string;
5
+ }>;
6
+ disabled?: boolean;
7
+ ariaLabel?: string;
8
+ };
9
+ type __VLS_PublicProps = {
10
+ modelValue?: string | null;
11
+ } & __VLS_Props;
12
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ "update:modelValue": (value: string | null) => any;
14
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
16
+ }>, {
17
+ disabled: boolean;
18
+ ariaLabel: string;
19
+ options: Array<{
20
+ label: string;
21
+ value: string;
22
+ }>;
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
24
+ root: HTMLDivElement;
25
+ }, HTMLDivElement>;
26
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { AdminModule, CategoriesOptions, Messages } from '@webx-ui/module-admin';
2
+ /**
3
+ * A reference book of the catalogue — labels, stock statuses, brands — as the satellite that owns
4
+ * it describes it (§4 of the dictionaries spec). Everything else is the same for each.
5
+ */
6
+ export interface DictionaryOptions {
7
+ /** The module the server registers: `catalog-labels`. */
8
+ id: string;
9
+ /** Its path under the catalogue's, and under the catalogue's API: `labels`. */
10
+ slug: string;
11
+ /** The described screen of one record: `catalog.label-form`. */
12
+ screen: string;
13
+ /** The facet of the products list that picks a record's products: `label`. */
14
+ facet: string;
15
+ /** The satellite's dictionary: `webx-catalog-labels`. */
16
+ namespace: string;
17
+ /** The group of it the list's words are in: `label`. */
18
+ group: string;
19
+ /** Its English, under the server's until the server's arrives. */
20
+ messages: Record<string, Messages>;
21
+ /** Where the catalogue lives in the panel — `catalog({ path })`'s. */
22
+ catalog?: string;
23
+ }
24
+ /**
25
+ * The panel's shared category screens for one reference book: the list with its order dragged
26
+ * and the number of products on each row, and the page of one record, which is the satellite's
27
+ * described screen. Rights are the catalogue's (decision 8), and "Show its products" is the list
28
+ * of products narrowed by the satellite's own facet.
29
+ */
30
+ export declare function dictionaryOptions(options: DictionaryOptions): CategoriesOptions;
31
+ /** A reference book as a section of the panel: one entry, two routes. */
32
+ export declare function dictionarySection(options: DictionaryOptions): AdminModule;
package/dist/editor.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
+ import { ScreenModel } from '@webx-ui/schema';
2
3
  import { GalleryVideo } from './galleryVideo';
3
4
  import { CategoryRow, ProductImage, ProductRow } from './types';
4
5
  /**
@@ -15,6 +16,12 @@ export interface ProductEditorContext {
15
16
  images: Ref<ProductImage[]>;
16
17
  /** Closed for writing: no permission, or a save in flight. */
17
18
  locked: Ref<boolean>;
19
+ /**
20
+ * The values of the form as they are right now, edits included — what a satellite's node reads
21
+ * when it depends on another field: the properties' tab redraws for a main category chosen and
22
+ * not yet saved. Left out by an editor that has no form around its nodes.
23
+ */
24
+ values?: Ref<ScreenModel>;
18
25
  /**
19
26
  * Video files on their way into the gallery. Kept up here rather than in the gallery field, whose
20
27
  * tab is taken down when another is opened — and an upload with it. The field makes its own
package/dist/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  export { catalog, type CatalogOptions } from './module';
2
2
  export { createCatalogApi, productSearch, CATALOG_API, type CatalogApi } from './api';
3
3
  export { catalogMessages } from './messages';
4
+ export { dictionaryOptions, dictionarySection, type DictionaryOptions } from './dictionaries';
5
+ export { FACET_PREFIX } from './filters';
6
+ export { TONES, toneBadge, type Tone } from './tones';
4
7
  export { provideProductEditor, productEditorKey, useProductEditor, provideCatalogCategoryEditor, categoryEditorKey, useCatalogCategoryEditor, type ProductEditorContext, type CategoryEditorContext, } from './editor';
5
8
  export { createGalleryVideo, VIDEO_PURPOSE, type GalleryVideo, type GalleryVideoOptions, type UnfinishedVideo, type VideoJob, type VideoJobStage, } from './galleryVideo';
6
9
  export { useCategoryTree, useFacetRegistry, type CategoryTree, type FacetRegistry } from './store';
@@ -14,4 +17,6 @@ export { default as WxCatalogDeletedPage } from './DeletedPage';
14
17
  export { default as WxCatalogCategoryField } from './CategoryField';
15
18
  export { default as WxCatalogFacetsField } from './FacetsField';
16
19
  export { default as WxCatalogGallery } from './GalleryField';
17
- export type { CategoryDetail, CategoryNode, CategoryRef, CategoryRow, DeletedCategory, DeletedKind, DeletedProduct, FacetChoice, FacetInfo, FacetKind, FacetSetting, ProductColumnInfo, ProductDetail, ProductImage, ProductQuery, ProductVideo, QueuedVideo, ProductRow, ProductSort, ProductState, ProductsPage, SkuHolder, } from './types';
20
+ export { default as WxCatalogToneField } from './ToneField';
21
+ export { default as WxCatalogColumnValue } from './ColumnValue';
22
+ export type { CategoryDetail, CategoryNode, CategoryRef, CategoryRow, ColumnRecord, ColumnValue, DeletedCategory, DeletedKind, DeletedProduct, FacetChoice, FacetInfo, FacetKind, FacetSetting, ProductColumnInfo, ProductDetail, ProductImage, ProductQuery, ProductVideo, QueuedVideo, ProductRow, ProductSort, ProductState, ProductsPage, SkuHolder, } from './types';