This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getAjax from 'helpers/get-ajax'; | |
export function normalizeValidateRules(rules){ | |
return _.reduce(rules, (memo, value, key) => { | |
memo[key] = normalizeValidationContext(value); | |
return memo; | |
}, {}); | |
} | |
export function normalizeValidationContext(context){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ControlWrapper from 'components/controls/wrapper'; | |
//import CollectionView from 'base/collection-view'; | |
import ModelSchema from '../model-schema'; | |
import EditProperty from './edit-property'; | |
export default ControlWrapper.extend({ | |
className:'edit-model-control', | |
renderAllCustoms: true, | |
isControlWrapper: false, | |
validateOnReady: true, | |
shouldShowError: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ControlWrapper from 'components/controls/wrapper'; | |
import Input from 'components/controls/input'; | |
import { textView } from 'base/view'; | |
import { validateItem } from 'helpers/validation'; | |
export default ControlWrapper.extend({ | |
shouldShowError: true, | |
className:'edit-model-property', | |
constructor(options = {}){ | |
ControlWrapper.apply(this, arguments); | |
this.mergeOptions(options, ['propertySchema','property']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { betterResult } from 'bbmn/utils'; | |
//import { flat, unflat } from '../../utils/index.js'; | |
// function deepClone(arg = {}){ | |
// return unflat(flat(arg || {})); | |
// } | |
export default function ModelSchema(properties = {}){ | |
this.properties = _.reduce(properties, (memo, property, name) => { | |
memo[name] = this._createProperty(name, property); | |
return memo; | |
}, {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import BaseObject from 'base/object'; | |
export default BaseObject.extend({ | |
initialize(opts){ | |
this.mergeOptions(opts,[ | |
'collection', 'multiple', | |
'getItemKey', 'getItemValue', 'getItemIndex', 'getItemByIndex', 'children', | |
'initialValue' | |
]); | |
this.store = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CollectionView from 'base/collection-view'; | |
import ControlMixin from '../mixin'; | |
import factory from 'components/values/factory'; | |
import UiItem from 'components/ui-item'; | |
import Selector from './selector'; | |
import Control from 'components/controls/control'; | |
const childView = UiItem.extend({ | |
constructor(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.on-off-slide-mixin(@glow-selector: glow, @glow-color: #444, @unglow-color: rgba(255,255,255,.2)) { | |
position:relative; | |
padding: 0; | |
width: 1.5em; | |
box-sizing: content-box; | |
border-radius: .5em; | |
border-width: .1em; | |
border-style: solid; | |
border-color: @unglow-color; |