@cratis/scene.primereact 4.23.0 → 4.24.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/scene.primereact",
3
- "version": "4.23.0",
3
+ "version": "4.24.0",
4
4
  "description": "The PrimeReact component package: maps Scene's abstract component names onto real PrimeReact components, and PrimeReact's free themes onto Scene themes.",
5
5
  "keywords": [
6
6
  "cratis",
@@ -59,15 +59,15 @@
59
59
  "build-storybook": "storybook build"
60
60
  },
61
61
  "dependencies": {
62
- "@cratis/scene.engine": "4.23.0",
63
- "@cratis/scene.model": "4.23.0",
64
- "@cratis/scene.react": "4.23.0",
62
+ "@cratis/scene.engine": "4.24.0",
63
+ "@cratis/scene.model": "4.24.0",
64
+ "@cratis/scene.react": "4.24.0",
65
65
  "@primeuix/themes": "^3.0.1"
66
66
  },
67
67
  "devDependencies": {
68
- "@cratis/scene.engine": "4.23.0",
69
- "@cratis/scene.model": "4.23.0",
70
- "@cratis/scene.react": "4.23.0",
68
+ "@cratis/scene.engine": "4.24.0",
69
+ "@cratis/scene.model": "4.24.0",
70
+ "@cratis/scene.react": "4.24.0",
71
71
  "@primereact/core": "11.2.0",
72
72
  "@primereact/headless": "11.2.0",
73
73
  "@primereact/types": "11.2.0",
@@ -0,0 +1,98 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { ComponentCategory } from '@cratis/scene.model';
5
+ import { ComponentMetadata, componentMetadata as m, toolbarDesignMode } from '@cratis/scene.react';
6
+
7
+ /** The category, icon, keywords and picker badge of every component of the package (CMP1), keyed by bare component name. */
8
+ export const primeReactComponentMetadata: Record<string, ComponentMetadata> = {
9
+ inputText: m('Text field', ComponentCategory.Input, 'text-cursor-input', ['text', 'input', 'string']),
10
+ inputTextarea: m('Text area', ComponentCategory.Input, 'text-align-start', ['multiline', 'text', 'notes']),
11
+ inputNumber: m('Number field', ComponentCategory.Input, 'hash', ['number', 'numeric', 'integer']),
12
+ password: m('Password', ComponentCategory.Input, 'key-round', ['secret', 'credentials', 'login']),
13
+ floatLabel: m('Float label', ComponentCategory.Input, 'tag', ['label', 'field', 'floating']),
14
+ iconField: m('Icon field', ComponentCategory.Input, 'face-slightly-smiling', ['icon', 'input', 'adornment']),
15
+ dropdown: m('Dropdown', ComponentCategory.Input, 'chevrons-up-down', ['select', 'choice', 'combo']),
16
+ multiSelect: m('Multi-select', ComponentCategory.Input, 'list-checks', ['multiple', 'select', 'choices']),
17
+ listBox: m('List box', ComponentCategory.Input, 'list', ['list', 'select', 'options']),
18
+ selectButton: m('Select button', ComponentCategory.Input, 'toggle-left', ['segmented', 'choice', 'toggle']),
19
+ checkbox: m('Checkbox', ComponentCategory.Input, 'square-check', ['boolean', 'tick', 'toggle']),
20
+ multiStateCheckbox: m('Multi-state checkbox', ComponentCategory.Input, 'square-minus', ['tri-state', 'checkbox', 'states']),
21
+ radioButton: m('Radio button', ComponentCategory.Input, 'circle-dot', ['radio', 'option']),
22
+ toggleSwitch: m('Toggle switch', ComponentCategory.Input, 'toggle-right', ['switch', 'boolean', 'on off']),
23
+ slider: m('Slider', ComponentCategory.Input, 'sliders-horizontal', ['range', 'value']),
24
+ rating: m('Rating', ComponentCategory.Input, 'star', ['stars', 'score', 'review']),
25
+ knob: m('Knob', ComponentCategory.Input, 'gauge', ['dial', 'value', 'range']),
26
+ calendar: m('Date picker', ComponentCategory.Input, 'calendar', ['date', 'calendar', 'time']),
27
+ colorPicker: m('Color picker', ComponentCategory.Input, 'palette', ['colour', 'swatch', 'hex']),
28
+ chips: m('Tag input', ComponentCategory.Input, 'tags', ['tags', 'chips', 'keywords'], 'Tg'),
29
+ autoComplete: m('Lookup', ComponentCategory.Input, 'search', ['autocomplete', 'suggest', 'search', 'combo']),
30
+ treeSelect: m('Tree select', ComponentCategory.Input, 'list-tree', ['hierarchy', 'select', 'tree']),
31
+ editor: m('Rich text editor', ComponentCategory.Input, 'pencil-line', ['wysiwyg', 'html', 'text']),
32
+ fileUpload: m('File upload', ComponentCategory.Input, 'upload', ['attachment', 'file', 'import']),
33
+ button: m('Button', ComponentCategory.Actions, 'mouse-pointer-click', ['click', 'submit', 'action'], 'Bt'),
34
+ splitButton: m('Split button', ComponentCategory.Actions, 'square-chevron-down', ['menu button', 'dropdown button', 'actions']),
35
+ speedDial: m('Speed dial', ComponentCategory.Actions, 'zap', ['floating', 'fab', 'actions']),
36
+ buttonGroup: m('Button group', ComponentCategory.Actions, 'group', ['buttons', 'segmented']),
37
+ dataTable: m('Data table', ComponentCategory.DataDisplay, 'table', ['grid', 'list', 'rows', 'table'], 'Tb'),
38
+ table: m('Table', ComponentCategory.DataDisplay, 'table-2', ['grid', 'rows', 'list'], 'Tb'),
39
+ column: m('Table column', ComponentCategory.DataDisplay, 'columns-3', ['heading', 'field']),
40
+ dataView: m('Data view', ComponentCategory.DataDisplay, 'layout-list', ['list', 'cards', 'grid', 'items']),
41
+ dataScroller: m('Data scroller', ComponentCategory.DataDisplay, 'scroll-text', ['infinite', 'lazy', 'list']),
42
+ tree: m('Tree', ComponentCategory.DataDisplay, 'list-tree', ['hierarchy', 'nodes', 'outline']),
43
+ treeTable: m('Tree table', ComponentCategory.DataDisplay, 'table-properties', ['hierarchy', 'grid', 'nodes']),
44
+ timeline: m('Timeline', ComponentCategory.DataDisplay, 'git-commit-vertical', ['history', 'events', 'activity', 'schedule'], 'Tl'),
45
+ paginator: m('Paginator', ComponentCategory.Navigation, 'chevrons-left-right', ['pages', 'paging', 'pagination']),
46
+ orderList: m('Order list', ComponentCategory.Input, 'arrow-up-down', ['reorder', 'sort', 'sequence']),
47
+ pickList: m('Pick list', ComponentCategory.Input, 'arrow-left-right', ['transfer', 'move', 'dual list']),
48
+ organizationChart: m('Organization chart', ComponentCategory.DataDisplay, 'network', ['org chart', 'hierarchy', 'tree']),
49
+ chart: m('Chart', ComponentCategory.DataDisplay, 'chart-column', ['graph', 'bar', 'line', 'pie', 'plot'], 'Ch'),
50
+ card: m('Card', ComponentCategory.Layout, 'square', ['panel', 'box', 'container']),
51
+ panel: m('Panel', ComponentCategory.Layout, 'panel-top', ['box', 'container', 'group']),
52
+ accordion: m('Accordion', ComponentCategory.Layout, 'chevrons-up-down', ['collapsible', 'expand', 'sections']),
53
+ fieldset: m('Fieldset', ComponentCategory.Forms, 'square-dashed', ['legend', 'group', 'field group']),
54
+ divider: m('Divider', ComponentCategory.Layout, 'separator-horizontal', ['separator', 'rule', 'line']),
55
+ splitter: m('Split pane', ComponentCategory.Layout, 'columns-2', ['splitter', 'resize', 'panes']),
56
+ scrollPanel: m('Scroll panel', ComponentCategory.Layout, 'scroll', ['scroll', 'overflow', 'container']),
57
+ tabView: m('Tabs', ComponentCategory.Navigation, 'folder', ['tab view', 'tabs', 'sections'], 'Tb'),
58
+ toolbar: m('Toolbar', ComponentCategory.Actions, 'wrench', ['actions', 'buttons', 'command bar'], 'Tl', toolbarDesignMode()),
59
+ stepper: m('Stepper', ComponentCategory.Navigation, 'footprints', ['wizard', 'steps', 'progress']),
60
+ dialog: m('Dialog', ComponentCategory.Overlay, 'app-window', ['modal', 'popup', 'window']),
61
+ confirmDialog: m('Confirm dialog', ComponentCategory.Overlay, 'circle-question-mark', ['confirm', 'yes no', 'modal']),
62
+ overlayPanel: m('Popover', ComponentCategory.Overlay, 'message-square', ['overlay', 'popup', 'panel']),
63
+ sidebar: m('Side sheet', ComponentCategory.Overlay, 'panel-right', ['drawer', 'sidebar', 'sheet']),
64
+ tooltip: m('Tooltip', ComponentCategory.Overlay, 'message-square', ['hint', 'hover', 'help']),
65
+ menu: m('Menu', ComponentCategory.Actions, 'menu', ['list', 'actions', 'options']),
66
+ menubar: m('Menu bar', ComponentCategory.Navigation, 'menu', ['top menu', 'navigation', 'bar']),
67
+ breadcrumb: m('Breadcrumbs', ComponentCategory.Navigation, 'chevron-right', ['trail', 'path', 'navigation']),
68
+ tabMenu: m('Tab menu', ComponentCategory.Navigation, 'folder', ['tabs', 'navigation', 'menu']),
69
+ steps: m('Steps', ComponentCategory.Navigation, 'list-ordered', ['wizard', 'stepper', 'progress']),
70
+ tieredMenu: m('Tiered menu', ComponentCategory.Actions, 'list-tree', ['nested', 'submenu', 'menu']),
71
+ panelMenu: m('Panel menu', ComponentCategory.Navigation, 'panel-left', ['accordion menu', 'sidebar menu', 'navigation']),
72
+ contextMenu: m('Context menu', ComponentCategory.Actions, 'mouse-pointer-2', ['right click', 'menu', 'actions']),
73
+ megaMenu: m('Mega menu', ComponentCategory.Navigation, 'layout-grid', ['large menu', 'navigation', 'columns']),
74
+ dock: m('Dock', ComponentCategory.Navigation, 'dock', ['launcher', 'taskbar', 'icons']),
75
+ message: m('Message', ComponentCategory.Feedback, 'message-square-warning', ['alert', 'notice', 'banner']),
76
+ inlineMessage: m('Inline message', ComponentCategory.Feedback, 'info', ['alert', 'hint', 'notice']),
77
+ toast: m('Toast', ComponentCategory.Feedback, 'bell', ['notification', 'snackbar', 'alert']),
78
+ image: m('Image', ComponentCategory.DataDisplay, 'image', ['picture', 'photo', 'media']),
79
+ galleria: m('Gallery', ComponentCategory.DataDisplay, 'images', ['photos', 'slideshow', 'images']),
80
+ carousel: m('Carousel', ComponentCategory.DataDisplay, 'gallery-horizontal', ['slides', 'slider', 'rotator']),
81
+ avatar: m('Avatar', ComponentCategory.DataDisplay, 'circle-user', ['user', 'profile', 'picture']),
82
+ badge: m('Badge', ComponentCategory.DataDisplay, 'badge', ['count', 'indicator', 'label']),
83
+ chip: m('Chip', ComponentCategory.DataDisplay, 'tag', ['tag', 'label', 'token']),
84
+ tag: m('Tag', ComponentCategory.DataDisplay, 'tag', ['label', 'status', 'chip']),
85
+ progressBar: m('Progress bar', ComponentCategory.Feedback, 'loader', ['progress', 'percent', 'loading']),
86
+ progressSpinner: m('Progress spinner', ComponentCategory.Feedback, 'loader-circle', ['spinner', 'loading', 'busy']),
87
+ skeleton: m('Skeleton', ComponentCategory.Feedback, 'rectangle-ellipsis', ['placeholder', 'loading', 'shimmer']),
88
+ scrollTop: m('Scroll to top', ComponentCategory.Navigation, 'arrow-up-to-line', ['back to top', 'scroll']),
89
+ blockUI: m('Block UI', ComponentCategory.Feedback, 'lock', ['mask', 'busy', 'overlay']),
90
+ inplace: m('In-place editor', ComponentCategory.Input, 'pencil', ['inline edit', 'click to edit']),
91
+ terminal: m('Terminal', ComponentCategory.DataDisplay, 'terminal', ['console', 'command line', 'shell']),
92
+ text: m('Text', ComponentCategory.DataDisplay, 'type', ['label', 'paragraph', 'copy']),
93
+ title: m('Title', ComponentCategory.DataDisplay, 'heading', ['heading', 'header', 'caption']),
94
+ field: m('Summary field', ComponentCategory.DataDisplay, 'tag', ['label', 'value', 'pair']),
95
+ section: m('Section', ComponentCategory.Layout, 'layout-panel-top', ['group', 'area', 'block']),
96
+ summary: m('Summary', ComponentCategory.DataDisplay, 'list', ['details', 'overview', 'facts']),
97
+ action: m('Command action', ComponentCategory.Actions, 'zap', ['command', 'invoke', 'submit']),
98
+ };
@@ -2,13 +2,14 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import { BindingSourceKind, ComponentDescriptor, PropertyDescriptor, PropertyEditorKind, PropertyValueType } from '@cratis/scene.model';
5
- import { componentRegistryKey } from '@cratis/scene.react';
5
+ import { componentRegistryKey, describeComponents } from '@cratis/scene.react';
6
6
  import { chartTypeChoices } from './chart/chartTypeChoices';
7
7
  import { legacyEnumerationChoices } from './legacyEnumerationChoices';
8
8
  import { ChartType } from './chart';
9
9
  import { TreeTableSelectionMode } from './data';
10
10
  import { FileUploadMode } from './file';
11
11
  import { primeReactInputDescriptors } from './inputDescriptors';
12
+ import { primeReactComponentMetadata } from './primeReactComponentMetadata';
12
13
 
13
14
  const key = (name: string) => componentRegistryKey('PrimeReact', name);
14
15
 
@@ -89,7 +90,7 @@ function treeNode(depth: number): PropertyDescriptor[] {
89
90
  }
90
91
 
91
92
  /** Design-time descriptors for PrimeReact controls whose authored data has structured configuration. */
92
- export const primeReactDescriptors: ComponentDescriptor[] = [
93
+ const describedPrimeReact: ComponentDescriptor[] = [
93
94
  ...primeReactInputDescriptors,
94
95
  {
95
96
  component: key('chart'),
@@ -193,3 +194,6 @@ export const primeReactDescriptors: ComponentDescriptor[] = [
193
194
  ],
194
195
  },
195
196
  ];
197
+
198
+ /** The `PrimeReact` descriptors: the hand-written ones above with every component's category, icon, keywords and design mode (CMP1). */
199
+ export const primeReactDescriptors: ComponentDescriptor[] = describeComponents('PrimeReact', describedPrimeReact, primeReactComponentMetadata);