import { AnomalyStatus, DropdownOptionState } from '../utils'; import { Utils } from '../utils/utils' export const SEGMENTS_DATA = [ { name: 'High Touch', value: 26.67, count: '222K' }, { name: 'Low Touch', value: 30.86, count: '222K' }, { name: 'No Touch', value: 30.45, count: '222K' }, ]; export const FEATURE_IMPORTANCE = { categories: [ 'Discount', 'Merchandising', 'Promotions', 'Weather', 'Store Count', 'Gender', 'Display', 'Feature', 'Basic Material', 'Category', 'Color Group', 'Lifecycle', ], data: [0.45, 0.32, 0.32, 0.29, 0.28, 0.27, 0.25, 0.22, 0.21, 0.2, 0.17, 0.1], }; export const FILTER_DATA = { segment_dropdown_values: [ { value: 'High Touch', selected: true }, { value: 'Low Touch', selected: true }, { value: 'No Touch', selected: true }, ], timeperiod_dropdown_values: { rootNode: true, expanded: true, children: [ { expanded: true, selected: true, label: '01/05/2020 (Period 1)', value: '01/05/2020 (Period 1)', children: [ { selected: true, value: '01/05/2020 (Week 1)', children: [], }, { value: '08/01/2020 (Week 2)', children: [], selected: true, }, { value: '15/05/2020 (Week 3)', children: [], selected: true, }, { value: '22/01/2020 (Week 4)', children: [], selected: true, }, ], }, { expanded: true, selected: true, value: '01/06/2020 (Period 2)', children: [ { value: '01/06/2020 (Week 1)', children: [], selected: true, }, { value: '06/06/2020 (Week 2)', children: [], selected: true, }, { value: '13/06/2020 (Week 3)', children: [], selected: true, }, { value: '20/06/2020 (Week 4)', children: [], selected: true, }, ], }, { expanded: true, selected: true, value: '01/07/2020 (Period 3)', children: [ { value: '01/07/2020 (Week 1)', children: [], selected: true, }, { value: '08/07/2020 (Week 2)', children: [], selected: true, }, { value: '13/07/2020 (Week 3)', children: [], selected: true, }, { value: '20/07/2020 (Week 4)', children: [], selected: true, }, ], }, ], }, classification_dropdown_values: [ { value: 'AZ', selected: true }, { value: 'CX', selected: true }, { value: 'BX', selected: true }, { value: 'AX', selected: true }, { value: 'AY', selected: true }, ], category_dropdown_values: [ { value: 'Fruity Confections', selected: true }, { value: 'Mint', selected: true }, { value: 'Chocolate', selected: true }, ], class_dropdown_values: [ { value: 'MILKY WAY US', selected: true }, { value: 'TWIX', selected: true }, { value: 'LIFE SAVERS', selected: true }, { value: 'SNICKERS', selected: true }, { value: 'SKITTLES', selected: true }, { value: 'DOVE', selected: true }, { value: 'Mixed', selected: true }, { value: '3 MUSKETEERS', selected: true }, { value: 'STARBURST', selected: true }, { value: "M&M'S", selected: true }, ], channel_dropdown_values: [ { value: 'South', selected: true }, { value: 'East', selected: true }, { value: 'West', selected: true }, { value: 'Midwest', selected: true }, ], version_dropdown_values: [ { value: 'Most recent', selected: false }, { value: '2.0.1', selected: true }, { value: '2.0.0', selected: false }, { value: '1.0.1', selected: false }, { value: '1.0.0', selected: false }, ], rule_dropdown_values: [ { ruleName: 'HighTouch-AX', selected: false, rulesData: [ { operator: 'AND', category: 'Classification', multiplier: null, modifier: 'equals', prevCategory: 'AX', prevMultiplier: null, }, { operator: 'AND', category: 'Segment', multiplier: null, modifier: 'equals', prevCategory: 'HIGH TOUCH', prevMultiplier: null, }, ], }, { ruleName: 'LowTouch-CX', selected: false, rulesData: [ { operator: 'AND', category: 'Classification', multiplier: null, modifier: 'equals', prevCategory: 'CX', prevMultiplier: null, }, { operator: 'AND', category: 'Segment', multiplier: null, modifier: 'equals', prevCategory: 'LOW TOUCH', prevMultiplier: null, }, ], }, ], }; export const MULTI_DETAIL_TOAST_BOTTOM = { data: { details: [ { name: 'Details /1855', selected: true, action: config => console.log(config, 'details toast click event'), selectCallback: toastState => console.log(toastState, 'new toast state'), }, ], endLink: { show: true, text: 'new details page', action: config => console.log(config, 'endlink clicked') }, }, position: { top: false, bottom: true, left: false, right: false }, type: 'multiDetailToast', }; export const MULTI_BUTTON_TOAST_BOTTOM_PRIMARY = { data: { buttons: [ { name: 'Run as Scenario', action: config => console.log(config, 'buttons toast click event'), disabled: false }, { name: 'Promote to Live', action: config => console.log(config, 'buttons toast click event'), disabled: false }, ], links: [{ name: 'reset', action: config => console.log(config, 'multi toast link click event'), disabled: false }], infoText: { show: false, text: 'any informatic text' }, }, style: 'multi-button-toast-primary-background', position: { top: false, bottom: true, left: false, right: false }, type: 'multiButtonToast', }; export const MULTI_DETAIL_TOAST_TOP = { data: { details: [ { name: 'Details /1855', selected: true, action: config => console.log(config, 'details toast click event'), selectCallback: toastState => console.log(toastState, 'new toast state'), }, { name: 'Overall Details', selected: false, action: config => console.log(config, 'details toast click event'), selectCallback: toastState => console.log(toastState, 'new toast state'), }, ], endLink: { show: false, text: 'new details page', action: config => console.log(config, 'endlink clicked') }, }, position: { top: true, bottom: false, left: false, right: false }, type: 'multiDetailToast', }; export const SINGLE_DETAIL_TOAST_TOP = { data: { container: { class: 'success-border' }, text: 'Forecast overide to', value: '65432', link: { text: 'undo', action: config => console.log(config, 'single detail link action') }, onClose: config => console.log(config, 'single detail onClose'), }, position: { top: true, bottom: false, left: true, right: true }, type: 'singleDetailToast', }; export const DROPDOWN_TOAST_BOTTOM = { data: { name: 'imputation method', options: [ { value: 'Auto', selected: true }, { value: 'manual', selected: false }, { value: 'static', selected: false }, ], selectCallback: toastState => console.log(toastState, 'new toast state'), onClose: config => console.log(config, 'single detail onClose'), }, position: { top: false, bottom: true, left: false, right: false }, type: 'dropdownToast', }; export const STATUS_TOAST_TOP = { data: { container: { class: 'error-border' }, content: { header: 'Tray Rounding Error', message: 'some message relavent to header', class: 'error-status-content', }, icon: { type: 'fa-exclamation-triangle', class: 'error-icon-container' }, onClose: config => console.log(config, 'single detail onClose'), }, position: { top: true, bottom: false, left: false, right: false }, type: 'statusToast', version: 'v1' }; export const STATUS_TOAST_BOTTOM = { data: { container: { class: 'success-border' }, content: { header: 'Tray Rounding Success', message: 'some message relavent to header', class: 'success-status-content', }, icon: { type: 'fa-check', class: 'success-icon-container' }, onClose: config => console.log(config, 'single detail onClose'), }, position: { top: false, bottom: true, left: false, right: false }, type: 'statusToast', }; export const ANOMALY_DATA = { data: { anomaly: [ { title: 'Anomaly #123', status: AnomalyStatus.UNRESOLVED, name: 'Name of type of anomaly', description: 'This is where a description of the anomaly would be shown in sentence or paragraph form', stat: [ { statName: 'expected value', statValue: '#value', }, { statName: 'actual value', statValue: '#value', }, ], }, { title: 'Anomaly #456', status: AnomalyStatus.RESOLVED, name: 'Name of type of anomaly', description: 'This is where a description of the anomaly would be shown in sentence or paragraph form', stat: [ { statName: 'expected value', statValue: '#value', }, { statName: 'actual value', statValue: '#value', }, ], }, { title: 'Anomaly #789', status: AnomalyStatus.MULTI, name: 'Name of type of anomaly', description: 'This is where a description of the anomaly would be shown in sentence or paragraph form', stat: [ { statName: 'expected value', statValue: '#value', }, { statName: 'actual value', statValue: '#value', }, ], }, ], }, }; export const HIERARCHICAL_SIDE_PANEL_DATA = [ { id: Utils.guid(), name: 'dimensionTables', value: 'Dimension Tables', selected: true, children: [ { id: Utils.guid(), name: 'productMember', value: 'Product Member', selected: true, }, { id: Utils.guid(), name: 'customerMenber', value: 'Customer Member', selected: false, }, { id: Utils.guid(), name: 'warehouseMember', value: 'Warehouse Member', selected: false, }, { id: Utils.guid(), name: 'timeMember', value: 'Time Member', selected: false, }, { id: Utils.guid(), name: 'productCorporateHierarchy', value: 'Product Corporate Hierarchy', selected: false, }, { id: Utils.guid(), name: 'customerCorporateHierarchy', value: 'Customer Corporate Hierarchy', selected: false, }, { id: Utils.guid(), name: 'warehouseCorporateHierarchy', value: 'Warehouse Corporate Hierarchy', selected: false, }, { id: Utils.guid(), name: 'weekHierarchy', value: 'Week Hierarchy', selected: false, }, { id: Utils.guid(), name: 'currencyCodes', value: 'Currency Codes', selected: false, }, { id: Utils.guid(), name: 'unitsOfMeasure', value: 'Units Of Measure', selected: false, }, { id: Utils.guid(), name: 'productChains', value: 'Product Chains', selected: false, }, { id: Utils.guid(), name: 'warehouseChains', value: 'Warehouse Chains', selected: false, }, { id: Utils.guid(), name: 'likeProducts', value: 'Like Products', selected: false, }, { id: Utils.guid(), name: 'likeLocation', value: 'Like Location', selected: false, }, ], }, { id: Utils.guid(), name: 'factTables', value: 'Fact Tables', selected: false, children: [ { id: Utils.guid(), name: 'sellInHistory', value: 'Sell-in History', selected: false, }, { id: Utils.guid(), name: 'sellOutHistory', value: 'Sell-out History', selected: false, }, { id: Utils.guid(), name: 'inventory', value: 'Inventory', selected: false, }, ], }, { id: Utils.guid(), name: 'resultsTables', value: 'Result Tables', selected: false, children: [ { id: Utils.guid(), name: 'forecastOutput', value: 'Forecast Output', selected: false, }, { id: Utils.guid(), name: 'forecastAccuracy', value: 'Forecast Accuracy', selected: false, }, { id: Utils.guid(), name: 'suggestedOrderOutput', value: 'Suggested Order Output', selected: false, }, ], }, { id: Utils.guid(), name: 'forecastTables', value: 'Forecast Tables', selected: false, children: [ { id: Utils.guid(), name: 'promotions', value: 'Promotions', selected: false, }, { id: Utils.guid(), name: 'priceHistory', value: 'Price History', selected: false, }, { id: Utils.guid(), name: 'plannerCodes', value: 'Planner Codes', selected: false, }, { id: Utils.guid(), name: 'weather', value: 'Weather', selected: false, }, { id: Utils.guid(), name: 'holidayCalender', value: 'Holiday Calender', selected: false, }, ], }, { id: Utils.guid(), name: 'predictiveOrdering', value: 'Predictive Ordering', selected: false, children: [ { id: Utils.guid(), name: 'routeMaster', value: 'Route Master', selected: false, }, { id: Utils.guid(), name: ' customerXRoute', value: ' Customer X Route', selected: false, }, { id: Utils.guid(), name: 'customerAssortment', value: 'Customer Assortment', selected: false, }, { id: Utils.guid(), name: 'customerServiceDays', value: 'Customer Service Days', selected: false, }, { id: Utils.guid(), name: 'safeCarryover', value: 'Safe Carryover', selected: false, }, { id: Utils.guid(), name: 'materialAvailabilityDays', value: 'Material Availability Days', selected: false, }, ], }, ]; export const RUN_AS_SCENARIO_MODAL = { header: 'Run as Scenario', namePanel: { title: 'name', value: null, }, tagsPanel: { title: 'tags', value: null, }, commentsPanel: { show: false, linkText: '+ add comments', title: 'comments', value: null, }, schedulePanel: { title: 'schedule run', value: null, }, settingsPanel: { title: 'Pipeline Settings', show: false, settings: [ { name: 'Pipeline Name One', type: 'Pipeline Type two', series: [ { selected: false, title: 'Time Series Available', value: 123.456, }, { selected: true, title: 'Time Series Selected', value: 567.89, }, ], retention: { selected: false, title: 'Retain', dropdownValues: [ { name: 'exampleOneRetain', value: 'Example 1 retain', selected: false }, { name: 'exampleTwoRetain', value: 'Example 2 retain', selected: false }, ], }, }, { name: 'Pipeline Name two', type: 'Pipeline Type three', series: [ { selected: false, title: 'Time Series Available', value: 467.854, }, { selected: true, title: 'Time Series Selected', value: 345.329, }, ], retention: { selected: false, title: 'Retain', dropdownValues: [ { name: 'exampleOneRetain', value: 'Example 1 retain', selected: false }, { name: 'exampleTwoRetain', value: 'Example 2 retain', selected: false }, ], }, }, ], }, cancelButtonText: 'Cancel', applyButtonText: 'Add', applyCallback: () => console.log('apply button clicked'), }; export const SHARE_MODAL = { title: 'Share', tabs: [ { name: 'share', value: 'Share', selected: true }, { name: 'assign', value: 'Assign', selected: false }, ], shareWithLabel: 'share with', problemsLabel: 'problem(s) to be resolved', subjectLabel: 'subject', messageLabel: 'message', applyLabel: 'Send', cancelLabel: 'Cancel', applyCallback: () => console.log('apply callback called'), }; export const SHARE_MODAL_USERS_DROPDOWN = [ { name: 'User1', value: 'User 1', selected: false }, { name: 'User2', value: 'User 2', selected: false }, ]; export const SHARE_MODAL_PROBLEMS_DROPDOWN = [ { name: 'problemOne', value: 'Problem 1', selected: false }, { name: 'problemTwo', value: 'Problem 2', selected: false }, ]; export const SIMPLE_OPTIONS = { options: [ { title: 'Scenario 1', info: 'rendering time 30m 3s', status: DropdownOptionState.SET }, { title: 'Scenario 2', info: 'processing... 1h 53m 15s', status: DropdownOptionState.PROCESSING }, ], }; export const FORECAST_RUN = { 'title-key': 'forecast-runs', 'title-details': 'forecast-runs', toolbar: [ { 'title-key': 'navigation', icons: [ { icon: 'fa-cubes', uri: '/sense-check', }, { icon: 'fa-cube', link: '/demand-details', }, { icon: 'fa-cog', link: '/forecast-list', }, ], }, ], grid: { titlekey: 'forecast-runs', 'grid-icons': [ [ { icon: 'fa-search', action: '/grid/search', }, { icon: 'fa-plus-circle', action: '/grid/add', }, ], [ { icon: 'fa-bolt', action: '/forecast/run', }, { icon: 'fa-server', action: '/forecast/batch', }, { icon: 'fa-edit', action: '/forecast/edit', }, { icon: 'fa-tash-alt', action: '/forecast/delete', }, ], ], 'multi-select': true, 'header-keys': ['name', 'last-run-by', 'last-run-on', 'details', 'status', 'run-log'], 'special-columns': { 'run-log': { icon: 'fa-list-ui', action: 'forecast-run-log', }, }, }, }; export const ANONYMOUS_RULES = [ { operator: 'AND', category: 'Current Accuracy', multiplier: 1, modifier: 'equals', prevCategory: 'Previous Accuracy', prevMultiplier: 0.99, }, { operator: 'OR', category: 'Classification', multiplier: null, modifier: 'equals', prevCategory: 'BX', prevMultiplier: null, }, { operator: 'AND', category: 'Segment', multiplier: null, modifier: 'equals', prevCategory: 'HIGH TOUCH', prevMultiplier: null, }, ]; export const ALERTS = { 'title-key': 'alerts', 'title-details': ['trayRoundingAlerts', 'overstock'], toolbar: [ { 'title-key': 'undo', icons: [ { icon: 'fas fa-undo-alt', status: 1, notification: false, type: 'undo', }, ], }, { 'title-key': 'redo', icons: [ { icon: 'fas fa-redo-alt', status: 1, notification: false, type: 'redo', }, ], }, { 'title-key': 'status', icons: [ { icon: 'fas fa-heartbeat', status: 1, notification: false, type: 'beat', }, ], }, { 'title-key': 'sync', icons: [ { icon: 'fas fa-sync', status: 1, notification: false, type: 'sync', }, ], }, ], }; export const CommonUIAppConfig = { applicationId: 10, applicationName: 'cu', configJson: { "pageTitle": "Common Component UI", "viewTabs": [ {"label": "UI", "id": 1}, {"label": "Code", "id": 2}, {"label": "Properties", "id": 3} ], "componentList": [ {"label": "Documentation", "link": "#documentation", "list": [ {"label": "ESP Common Documentation", "target":"_blank", "link": "https://antuit.atlassian.net/wiki/spaces/ESP/pages/1331003595/ESP+Common+UI+Components"}, {"label": "How to make changes to ESP Common Components", "target": "_blank", "link": "https://antuit.atlassian.net/wiki/spaces/ANTUITINFR/pages/1419411466/Steps+to+make+changes+to+esp-common+npm+package"} ]}, {"label": "Components", "list": [ {"label": "header-label", "className": "header"}, {"label": "footer","className": "footer-comp"}, {"label": "single-select-dropdown-component", "className": "single-select"}, {"label": "multi-select-dropdown-component", "className": "multi-select"}, {"label": "card-component", "className": "card-component"}, {"label": "toast", "className": "toast-comp"}, {"label": "modal", "className": "modal-comp"}, {"label": "primary-toolbar", "className": "toolbar-primary"}, {"label": "loader", "className": "loader"}, {"label": "hierarchical-dropdown", "className": "hierarchical-dropdown"}, {"label": "e-charts", "className": "e-charts"}, {"label": "side-menu-nav", "className": "side-menu-nav"}, {"label": "simple-pagination", "className": "simple-pagination"} ]} ], "components": [ { "label": "header-label", "class": "header", "activeTab": 1, "status": "prod-ready", "tag": "", "properties": [ {"label": "(headerEvent)", "type": "Event Binding", "description": "Use this function for logging out the user in the app.component.ts file", "required": true} ]}, { "label": "footer", "class": "footer-comp", "activeTab": 1, "status": "prod-ready", "tag": ""}, {"label": "single-select-dropdown-component", "class": "single-select", "status": "prod-ready", "activeTab": 1, "properties": [ {"label": "[singleSelectOptions]", "required": true, "type": "Array", "code": [ {"value": "Option One", "id": 1, "selected": false}, {"value": "Option Two", "id": 2, "selected": false}, {"value": "Option Three", "id": 3, "selected": false}, {"value": "Option Four", "id": 4, "selected": false}, {"value": "Option Five", "id": 5, "selected": false}, {"value": "Option Six", "id": 6, "selected": false}, {"value": "Option Seven", "id": 7, "selected": false} ], "description": "Takes an Array of Options", "defaultInput": "[]"}, {"label": "[dropdownType]", "type": "String", "description": "singleSelect or multiSelect", "code": {"dropdownType": "singleSelect"}, "required": true, "defaultInput": ""}, {"label": "[placeholder]", "type": "String", "description": "Pass a string as placeholder", "code": {"placeholder": "Please select an option"}, "required": true, "defaultInput": ""}, {"label": "[dropdownDisabled]", "type": "Boolean", "description": "If true dropdown will be disabled", "code": {"dropdownDisabled": false}, "defaultInput": "false"}, {"label": "[showClearSelection]", "type": "Boolean", "description": "If true show a clearSelection button which on click clear the ui selection", "code": {"showClearSelection": true}, "defaultInput": "false"}, {"label": ",(clearSingleSelection)","type": "Event Binding", "description": "Emits a event that lets you clear selection in your child component"}, {"label": "[showSearch]", "type": "Boolean", "description": "If true will show a search bar on top of the list", "code": {"showSearch": true}, "defaultInput": "false"}, {"label": "(dropdownSearch)", "type": "Event Binding", "description": "Emits an event containing the searchText which you can use to filter your list"}, {"label": "[isInfiniteScroll]", "type": "Boolean", "description": "If true will activate Infinite Scroll", "code": {"isInfiniteScroll": true}, "defaultInput": "false"}, {"label": "(dropdownScrolled)", "type": "Event Binding", "description": "Emits an event when scrolled down where you can load more data"} ], "dropDownName": "Common UI Example", "showClearSelection": true, "dropdownType": "singleSelect", "placeholder": "Please select an option", "dropdownList": [ {"value": "Option One", "id": 1, "selected": false}, {"value": "Option Two", "id": 2, "selected": false}, {"value": "Option Three", "id": 3, "selected": false}, {"value": "Option Four", "id": 4, "selected": false}, {"value": "Option Five", "id": 5, "selected": false}, {"value": "Option Six", "id": 6, "selected": false}, {"value": "Option Seven", "id": 7, "selected": false} ]}, {"label": "multi-select-dropdown-component", "status": "prod-ready", "activeTab": 1, "class": "multi-select", "properties": [ {"label": "[multiSelectOptions]", "required": true, "type": "Array", "code": [ {"value": "Option One", "id": 1, "selected": false}, {"value": "Option Two", "id": 2, "selected": false}, {"value": "Option Three", "id": 3, "selected": false}, {"value": "Option Four", "id": 4, "selected": false}, {"value": "Option Five", "id": 5, "selected": false}, {"value": "Option Six", "id": 6, "selected": false}, {"value": "Option Seven", "id": 7, "selected": false} ], "description": "Takes an Array of Options", "defaultInput": "[]"}, {"label": "[dropdownType]", "type": "String", "description": "singleSelect or multiSelect", "code": {"dropdownType": "multiSelect"}, "required": true, "defaultInput": ""}, {"label": "[placeholder]", "type": "String", "description": "Pass a string as placeholder", "code": {"placeholder": "Please select options"}, "required": true, "defaultInput": ""}, {"label": "[dropdownDisabled]", "type": "Boolean", "description": "If true dropdown will be disabled", "code": {"dropdownDisabled": false}, "defaultInput": "false"}, {"label": "[showClearSelection]", "type": "Boolean", "description": "If true show a clearSelection button which on click clear the ui selection", "code": {"showClearSelection": true}, "defaultInput": "false"}, {"label": "(clearSingleSelection)","type": "Event Binding", "description": "Emits a event that lets you clear selection in your child component"}, {"label": "[showSearch]", "type": "Boolean", "description": "If true will show a search bar on top of the list", "code": {"showSearch": true}, "defaultInput": "false"}, {"label": "(dropdownSearch)", "type": "Event Binding", "description": "Emits an event containing the searchText which you can use to filter your list"}, {"label": "[isInfiniteScroll]", "type": "Boolean", "description": "If true will activate Infinite Scroll", "code": {"isInfiniteScroll": true}, "defaultInput": "false"}, {"label": "(dropdownScrolled)", "type": "Event Binding", "description": "Emits an event when scrolled down where you can load more data"} ], "dropDownName": "Common UI Example", "showClearSelection": true, "dropdownType": "singleSelect", "placeholder": "Please select an option", "dropdownList": [ {"value": "Option One", "id": 1, "selected": false}, {"value": "Option Two", "id": 2, "selected": false}, {"value": "Option Three", "id": 3, "selected": false}, {"value": "Option Four", "id": 4, "selected": false}, {"value": "Option Five", "id": 5, "selected": false}, {"value": "Option Six", "id": 6, "selected": false}, {"value": "Option Seven", "id": 7, "selected": false} ]}, {"label": "card-component", "activeTab": 1, "status": "prod-ready", "class": "card-component", "breadcrumb":{ "title": "Breadcrumb", "breadcrumbList": [ "info", "details" ] }, "cardFilterList": [ { "name": "card-filter", "dropdownType": "singleSelect", "selectAllLabel": "All", "showSelectAll": true, "createScope": true, "resetUi": true, "options": [ { "value": "1", "label": "Option One", "selected": true }, { "value": "2", "label": "Option Two", "selected": false }, { "value": "7", "label": "Option Three", "selected": false }, { "value": "4", "label": "Option Four", "selected": false } ] } ], "properties": [ {"label": "[cardTitle]", "type": "String", "code": {"cardTitle": "Card Title"}, "description": "Provide a title for the Card", "defaultInput": ""}, {"label": "[styleContent]", "type": "String", "code": {"styleContent": "p-32"}, "description": "Pass class(es) that you would like apply to card-content node", "defaultInput": ""}, {"label": "[cardSubTitle]", "type": "String", "code": {"cardSubTitle": "Card SubTitle Title"}, "description": "Provide a sub-title for the Card", "defaultInput": ""}, {"label": "[showBorder]", "type": "Boolean", "code": {"showBorder": true}, "description": "Shows a border between the Card Title and Card Content", "defaultInput": true}, {"label": "[autoHeight]", "type": "Boolean", "code": {"autoHeight": true}, "description": "Sets a card height according to your content", "defaultInput": true}, {"label": "[showBreadcrumbs]", "type": "Boolean", "code": {"breadcrumbs": true}, "description": "Pass true to turn on breadcrumbs", "defaultInput": false}, {"label": "[i18n]", "type": "Object", "description": "Pass your components i18n translation file to translate labels with in Card Component", "code": { "translations": { "header": "Common Component UI", "card-filter": "Card Filter" } }}, {"label": "[breadcrumbs]", "type": "Object", "code": { "title": "Breadcrumb", "breadcrumbList": [ "info", "details" ] }, "description": "Take an Object containing the breadcrumb structure"}, {"label": "(BreadcrumbClicked)", "type": "Event Binding", "description": "You can use link event to navigate to respective ui"}, {"label": "(cardFilterValueChanged)", "type": "Event Binding", "description": "Can you bind an event to the Card Filter Selection, it also returns the value changes in the event"}, {"label": "[cardFilterList]", "type": "Array", "code": [{ "name": "card-filter", "dropdownType": "singleSelect", "selectAllLabel": "All", "showSelectAll": true, "createScope": true, "resetUi": true, "options": [ { "value": "1", "label": "Option One", "selected": true }, { "value": "2", "label": "Option Two", "selected": false }, { "value": "7", "label": "Option Three", "selected": false }, { "value": "4", "label": "Option Four", "selected": false } ]} ], "description": "Pass a similar structured array shown in the code section"} ]}, {"label": "toast", "activeTab": 1, "status": "prod-ready", "class": "toast-comp", "functionalProperties": [ {"label": "addToast()", "description": "After you import the ToastService you can you this function to pass your toastConfig to this.toastService.addToasts(toastConfig)", "code": { "statusToastConfig": { "data": { "container": { "class": "success-border" }, "content": { "header": "optimize-submit-toast-header", "message": "optimize-submit-toast-message", "class": "success-status-content" }, "icon": { "type": "fa-check", "class": "success-icon-container" } }, "position": { "top": true, "bottom": false, "left": false, "right": false }, "type": "statusToast", "showTimeout": "4000" }, "singleDetailToastConfig": { "data": { "value": "", "link": { "class": "comment-icon", "text": "" }, "icon": { "class": "close-icon" }, "container": { "class": "comment-added" }, "text": "Single Detail Toast", "addTimeout": true, "toastTimeout": "5000" }, "position": { "top": true, "bottom": false, "left": true, "right": true }, "type": "singleDetailToast" }, "multiButtonToast": { "data": { "buttons": [ { "name": "Save" } ], "links": [ { "name": "Cancel" } ], "infoText": { "show": false, "text": "Double click to edit single values, single click off the field to return to Selection Mode. " } }, "style": "multi-button-toast-primary-background", "position": { "top": false, "bottom": true, "left": false, "right": false }, "type": "multiButtonToast" } }}, {"label": "deleteToast(config)", "description": "Use deleteToast(config) to delete specific toasts by passing the specific toast config. This function is generally used to close toast"}, {"label": "deleteToasts()", "description": "Use deleteToast() to delete all toasts. You can use this function to delete any toast that is being displayed."} ] , "tag": ""}, {"label": "modal", "activeTab": 1, "status": "prod-ready", "class": "modal-comp", "functionalProperties": [ {"label": "openConfirmModal()", "description": "After you import the ModalService you can you this function to pass your modalConfig to this.modalService.openConfirmModal", "code": { "modalConfig": { "data": { "title": "Confirm Modal", "message": "This is a Confirm modal", "disableContinue": false, "i18n": "this.i18n" } } }}, {"label": "onClose()", "description": "Create a subject that you can use to get response when close or confirm is clicked ex: this.modalService.bsModalRef.content.onClose = new Subject();"}, {"label": "onClose.subscribe()", "description": "Subscribe to onClose subject, whose reponse you can use to fire different events in you component, Ex: this.modalService.bsModalRef.content.onClose.subscribe()"} ]}, {"label": "primary-toolbar", "activeTab": 1, "status": "prod-ready", "class": "toolbar-primary", "properties": [ {"label": "[tabList]", "required": true, "type": "Array", "defaultInput": "[]", "description": "Pass an array of objects for your tabs.", "code": [ "TabOne", "TabTwo", "TabThree" ]}, {"label":"[activeTabIndex]", "required": true, "type": "Number", "defaultInput": "0", "description": "Initially your activeTabIndex wil be 0, this variable with change will the change in tabSelection"}, {"label": "(tabChangeEvent)", "required": true, "type": "Event Binding", "defaultInput": "", "description": "Emits and event that you can use to apply changes to tabs in you component. Also use this event to update the activeTabIndex"} ], "tabs": ["Tab One","Tab Two","Tab Three"]}, {"label": "loader", "activeTab": 1, "status": "prod-ready", "class": "loader", "tag": "", "functionalProperties": [ {"label": "startLoader()", "description": "After importing the LoaderService you can use loaderService.startLoader() to show the loader for any API your component might perform."}, {"label": "stopLoader()", "description": "After you get your response or complete the API call you should use stopLoader() to get rid of the loader."} ]}, {"label": "hierarchical-dropdown", "activeTab": 1, "status": "prod-ready", "class": "hierarchical-dropdown", "tag": "", "properties": [ {"label": "[selectAllLabel]", "required": true, "type": "String", "defaultInput": "All", "description": "Provide a title for the hierarchical dropdown.", "code":[] }, {"label": "[showBorder]", "required": true, "type": "Boolean", "defaultInput": "False", "description": "If true dropdown will be enabled.", "code":[] }, {"label": "[hierarchicalSelectOptions]", "required": true, "type": "Object", "defaultInput": "[]", "description": "Pass the object inside the code.", "code":[ { "rootNode": true, "expanded": true, "children": [ { "expanded": true, "selected": true, "value": "1", "label": "KROGER CO HQ", "children": [ { "selected": true, "value": "2001", "children": [], "label": "KROGER", "dimensionLevel": "location" } ], "dimensionLevel": "region" }, { "expanded": true, "selected": true, "value": "2", "label": "WAKEFERN", "children": [ { "selected": true, "value": "2002", "children": [], "label": "SHOPRITE", "dimensionLevel": "location" } ], "dimensionLevel": "region" }, { "expanded": true, "selected": true, "value": "3", "label": "WALMART STORES HQ", "children": [ { "selected": true, "value": "2003", "children": [], "label": "WALMART", "dimensionLevel": "location" } ], "dimensionLevel": "region" } ] } ] }, {"label": "(selectChange)", "required": true, "type": "Event Binding", "defaultInput": "", "description": "Event that you can use to change dropdown in you component. Also use this event to update the activeDropDown.", "code":[] } ]}, {"label": "e-charts", "activeTab": 1, "status": "prod-ready", "class": "e-charts", "properties": [ {"label": "[initOpts]", "required": true, "defaultInput": "{}", "type": "Object", "description": "Takes an object where key is renderer and value is svg", "code": {"renderer": "svg"}}, {"label": "[options]", "required": true, "defaultInput": "{}", "type": "Object", "description": "Takes an object options where you can pass the values need to create eCharts", "code": { "legend": {}, "tooltip": { "trigger": "axis", "showContent": false }, "dataset": { "source": [ ["product", "2012", "2013", "2014", "2015", "2016", "2017"], ["Milk Tea", 56.5, 82.1, 88.7, 70.1, 53.4, 85.1], ["Matcha Latte", 51.1, 51.4, 55.1, 53.3, 73.8, 68.7], ["Cheese Cocoa", 40.1, 62.2, 69.5, 36.4, 45.2, 32.5], ["Walnut Brownie", 25.2, 37.1, 41.2, 18, 33.9, 49.1] ] }, "xAxis": { "type": "category" }, "yAxis": { "gridIndex": 0 }, "grid": { "top": "55%" }, "series": [ { "type": "line", "smooth": true, "seriesLayoutBy": "row", "emphasis": { "focus": "series" } }, { "type": "bar", "smooth": true, "seriesLayoutBy": "row", "emphasis": { "focus": "series" } }, { "type": "line", "smooth": true, "seriesLayoutBy": "row", "emphasis": { "focus": "series" } }, { "type": "bar", "smooth": true, "seriesLayoutBy": "row", "emphasis": { "focus": "series" } }, { "type": "pie", "id": "pie", "radius": "30%", "center": ["50%", "25%"], "emphasis": { "focus": "self" }, "label": { "formatter": "{b}: {@2012} ({d}%)" }, "encode": { "itemName": "product", "value": "2012", "tooltip": "2012" } } ] }} ]}, {"label": "side-menu-nav", "activeTab": 1, "status": "prod-ready", "class": "side-menu-nav", "properties": [ {"label": "[position]", "required": true, "defaultInput":"left", "type": "String", "description": "Supply a position for the sidebar. Options: left,right,top,bottom"}, {"label": "[minHeight]", "required": true, "defaultInput":100, "type": "Number", "description": "Supply a numeric value for the height of the sidebar"}, {"label": "[sidebarData]", "required": true, "defaultInput":"[]", "type": "Array", "description": "Supply an array of menu items to be list in the sidebar", "code": ["Red", "Yellow", "Black", "Blue", "Purple"]} ]}, {"label": "simple-pagination", "activeTab": 1, "status": "prod-ready", "class": "simple-pagination", "properties": [ {"label": "[totalRows]", "required": true, "type": "Number", "defaultInput": "", "description": "Pass the length of your table.", "code":[] }, {"label": "[pageOptions]", "required": true, "type": "Object", "defaultInput": "[]", "description": "Pass the object inside the code.", "code":[ { "show": true, "options": [ { "label": "view-10-rows", "value": 10, "selected": true }, { "label": "view-20-rows", "value": 20, "selected": false } ] } ] }, {"label": "[pageAfter]", "required": true, "type": "Number", "defaultInput": "0", "description": "If true show the next page.", "code":[] }, {"label": "(paginationClicked)", "required": true, "type": "Event Binding", "defaultInput": "", "description": "Event that you can use to change the current page data in your component.", "code":[] } ]} ], "resources": { "tableDataPageOne":[ {"name": "A", "age": 30 , "role": "Manager1"}, {"name": "B", "age": 31 , "role": "Manager2"}, {"name": "C", "age": 32 , "role": "Manager3"}, {"name": "D", "age": 33 , "role": "Manager4"}, {"name": "E", "age": 34 , "role": "Manager5"}, {"name": "F", "age": 35 , "role": "Manager6"}, {"name": "G", "age": 36 , "role": "Manager7"}, {"name": "H", "age": 37 , "role": "Manager8"}, {"name": "I", "age": 38 , "role": "Manager9"}, {"name": "J", "age": 39 , "role": "Manager10"} ], "tableDataPageTwo":[ {"name": "K", "age": 40 , "role": "Manager11"}, {"name": "L", "age": 41 , "role": "Manager12"} ], "dropdownAdditionalArray": [ {"value": "Option Eight (New)", "id": 8, "selected": false}, {"value": "Option Nine (New)", "id": 9, "selected": false}, {"value": "Option Ten (New)", "id": 10, "selected": false} ], "modalConfig": { "data": { "title": "Confirm Modal", "message": "This is a Confirm modal", "disableContinue": false } }, "formsModalConfig": { "data": { "title": "Forms Modal" } }, "hierarchicalSelectOptions": { "rootNode": true, "expanded": true, "children": [ { "expanded": true, "selected": true, "value": "1", "label": "KROGER CO HQ", "children": [ { "selected": true, "value": "2001", "children": [], "label": "KROGER", "dimensionLevel": "location" } ], "dimensionLevel": "region" }, { "expanded": true, "selected": true, "value": "2", "label": "WAKEFERN", "children": [ { "selected": true, "value": "2002", "children": [], "label": "SHOPRITE", "dimensionLevel": "location" } ], "dimensionLevel": "region" }, { "expanded": true, "selected": true, "value": "3", "label": "WALMART STORES HQ", "children": [ { "selected": true, "value": "2003", "children": [], "label": "WALMART", "dimensionLevel": "location" } ], "dimensionLevel": "region" } ] }, "eChartsData": { "legend": {}, "tooltip": { "trigger": "axis", "showContent": false }, "dataset": { "source": [ ["product", "2012", "2013", "2014", "2015", "2016", "2017"], ["Milk Tea", 56.5, 82.1, 88.7, 70.1, 53.4, 85.1], ["Matcha Latte", 51.1, 51.4, 55.1, 53.3, 73.8, 68.7], ["Cheese Cocoa", 40.1, 62.2, 69.5, 36.4, 45.2, 32.5], ["Walnut Brownie", 25.2, 37.1, 41.2, 18, 33.9, 49.1] ] }, "xAxis": { "type": "category" }, "yAxis": { "gridIndex": 0 }, "grid": { "top": "55%" }, "series": [ { "type": "line", "smooth": true, "seriesLayoutBy": "row", "emphasis": { "focus": "series" } }, { "type": "bar", "smooth": true, "seriesLayoutBy": "row", "emphasis": { "focus": "series" } }, { "type": "line", "smooth": true, "seriesLayoutBy": "row", "emphasis": { "focus": "series" } }, { "type": "bar", "smooth": true, "seriesLayoutBy": "row", "emphasis": { "focus": "series" } }, { "type": "pie", "id": "pie", "radius": "30%", "center": ["50%", "25%"], "emphasis": { "focus": "self" }, "label": { "formatter": "{b}: {@2012} ({d}%)" }, "encode": { "itemName": "product", "value": "2012", "tooltip": "2012" } } ] }, "pagination": { "show": true, "options": [ { "label": "view-10-rows", "value": 10, "selected": true }, { "label": "view-20-rows", "value": 20, "selected": false } ] } } }, i18n: { "translations": { "header": "Common Component UI", "card-filter": "Card Filter", "name": "Name", "age": "Age", "role": "Role", "interests": "Interests", "comments": "Comments", "header-label": "Header", "footer": "Footer", "single-select-dropdown-component": "Single Select Dropdown Component", "multi-select-dropdown-component": "Multi Select Dropdown Component", "card-component": "Card Component", "toast": "Toast", "modal": "Modal", "primary-toolbar": "Primary Toolbar", "loader": "Loader", "e-charts": "E-Charts", "side-menu-nav": "Side Menu Nav", "simple-pagination": "Simple Pagination", "hierarchical-dropdown": "Hierarchical Dropdown" } }, shortUserName: 'SM', userFullName: 'Sujan Manandhar', userId: 'f5ead135-0a68-4c05-80e4-4fb9c0fb5a75', __typename: 'Application' } export const MockUserConfig = { applications: [ { applicationId: 1, applicationName: "df", configJson: {}, i18n: { translations: { df: 'Demand Forecasting' } }, __typename: "Application" }, { applicationId: 2, applicationName: "dpo", configJson: {}, i18n: { translations: { dpo: 'Predictive Ordering' } }, __typename: "Application" }, { applicationId: 3, applicationName: "dmgmt", configJson: {}, i18n: { translations: { dmgmt: "Data Management" } }, __typename: "Application" }, { applicationId: 5, applicationName: "tpo", configJson: {}, i18n: { translations: { tpo: "Trade Promotion" } }, __typename: "Application" }, { applicationId: 6, applicationName: "iop", configJson: {}, i18n: { translations: { iop: "Order Promising" } }, __typename: "Application" }, { applicationId: 7, applicationName: "cc", configJson: {}, i18n: { translations: { cc: "Control Center" } }, __typename: "Application" }, { applicationId: 8, applicationName: "home", configJson: {}, i18n: { translations: { home: "Home" } }, __typename: "Application" }, { applicationId: 9, applicationName: "dp", configJson: {}, i18n: { translations: { dp: "Demand Planning" } }, __typename: "Application" }, { applicationId: 10, applicationName: "vm", configJson: {}, i18n: { translations: { vm: "AI Virtual Machine Web Console" } }, __typename: "Application" }, { applicationId: 13, applicationName: "fars", configJson: {}, i18n: { translations: { fars: "FARS" } }, __typename: "Application" } ], defaultApp: "home", email: "sujan.manandhar@antuit.ai", espUserToken: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJpZCI6ImY1ZWFkMTM1LTBhNjgtNGMwNS04MGU0LTRmYjljMGZiNWE3NSIsIm5hbWUiOiJTdWphbiBNYW5hbmRoYXIiLCJnaXZlbk5hbWUiOiJTdWphbiIsImZhbWlseU5hbWUiOiJNYW5hbmRoYXIiLCJlbWFpbCI6InN1amFuLm1hbmFuZGhhckBhbnR1aXQuYWkiLCJ1c2VyRXh0ZXJuYWxJZCI6ImFmZTYzZDQ1LWNmMTYtNDEzMC04YTJlLTU2MTdiYTYyZTY4MyJ9LCJpYXQiOjE2NDkwODkyNjQsImV4cCI6MTY1OTQ1NzI2NCwiYXVkIjoiaHR0cHM6Ly93d3cuYW50dWl0LmFpLyIsImlzcyI6IkFudHVpdCBBSSIsInN1YiI6ImFkbWluQGFudHVpdC5haSJ9.l09e1Sk9BK9VG70v6Z66hajTzWu5QPPiXMpWNZRswy9zcvbK6ZNfzPb1Ga3zr4PUe-9uE-WtCBbfZIhkO7y6tw", firstName: "Sujan", lastName: "Manandhar", locale: null, userId: "f5ead135-0a68-4c05-80e4-4fb9c0fb5a75", __typename: "User" }