{{#neq item.psEditor.editorType "HIDDEN"}}
<AppFormItem 
  name="{{item.codeName}}"
  {{#if item.captionItemName}}
  :label="state.data.{{lowerCase item.captionItemName}}"
  {{else}}
  label="{{item.caption}}"
  {{/if}}
  {{#if item.labelPos}}
  labelPos="{{item.labelPos}}"
  {{/if}}
  :labelWidth="{{item.labelWidth}}"
  :showLabel="{{item.showCaption}}"
  :rules="state.rules.{{item.codeName}}"
  :required="state.detailsModel.{{item.codeName}}.required"
  :visible="state.detailsModel.{{item.codeName}}.visible" 
  :layoutOpts="{{> @macro/front-end/common/layoutPos.hbs layout=item.psLayout layoutPos=item.psLayoutPos}}"
{{#if item.psSysCss}}
  class="{{item.psSysCss.cssName}}"
{{/if}}
{{#if item.labelPSSysCss}}
  labelClass="{{item.labelPSSysCss.cssName}}"
{{/if}}
{{#if (or item.width item.height)}}
  style="{{#if item.width}}width: {{item.width}}px;{{/if}}{{#if item.height}}height: {{item.height}}px;{{/if}}"
{{/if}}
  >
{{#if item.compositeItem}}
  {{#if (or (eq item.psEditor.editorType 'DATERANGE') (eq item.psEditor.editorType 'DATERANGE_NOTIME'))}}
    <AppDateRange
      :refFormItem="
      {{#if item.psDEFormItems}}
      {{~#each item.psDEFormItems as | formItem | ~}}
        {{#if @first}}[{{/if~}}
        '{{formItem.name}}'{{#unless @last}},{{/unless}}
        {{~#if @last}}]{{/if~}}
      {{/each}}
      {{else}}
        []
      {{/if}}"
      name="{{item.codeName}}"
      :value="state.data.{{item.psEditor.name}}"
      :activeData="state.data"
      editorType="{{item.psEditor.editorType}}"  
      :disabled="state.detailsModel.{{item.codeName}}.disabled"
      {{#if item.psEditor.editorParams.TIMEFMT}}
      format="{{item.psEditor.editorParams.TIMEFMT}}"
      {{/if}}
      @editorEvent="onEditorEvent"
    >
    </AppDateRange>   
  {{else if (eq item.psEditor.editorType 'NUMBERRANGE')}}
    <AppNumberRange
      :refFormItem="
      {{#if item.psDEFormItems}}
      {{~#each item.psDEFormItems as | formItem | ~}}
        {{#if @first}}[{{/if~}}
        '{{formItem.name}}'{{#unless @last}},{{/unless}}
        {{~#if @last}}]{{/if~}}
      {{/each}}
      {{else}}
        []
      {{/if}}"
      name="{{item.codeName}}"
      :value="state.data.{{item.psEditor.name}}"
      :activeData="state.data"
      editorType="{{item.psEditor.editorType}}"  
      :disabled="state.detailsModel.{{item.codeName}}.disabled"
      {{#if item.psEditor.editorParams.TIMEFMT}}
      format="{{item.psEditor.editorParams.TIMEFMT}}"
      {{/if}}
      @editorEvent="onEditorEvent"
    >
    </AppNumberRange>   
  {{else}}
    <AppRangeEditor
      :refFormItem="
      {{#if item.psDEFormItems}}
      {{~#each item.psDEFormItems as | formItem | ~}}
        {{#if @first}}[{{/if~}}
        '{{formItem.name}}'{{#unless @last}},{{/unless}}
        {{~#if @last}}]{{/if~}}
      {{/each}}
      {{else}}
        []
      {{/if}}"
      name="{{item.codeName}}"
      :value="state.data.{{item.psEditor.name}}"
      :activeData="state.data"
      editorType="{{item.psEditor.editorType}}"  
      :disabled="state.detailsModel.{{item.codeName}}.disabled"
      {{#if item.psEditor.editorParams.TIMEFMT}}
      format="{{item.psEditor.editorParams.TIMEFMT}}"
      {{/if}}
      @editorEvent="onEditorEvent"
    >
    </AppRangeEditor> 
  {{/if}} 
{{else}}
  {{#if item.psEditor}}
    <div class="form-editor-container" style="{{#if item.psEditor.editorWidth}}width: {{item.psEditor.editorWidth}}px;{{/if}}{{#if item.psEditor.editorHeight}}height: {{item.psEditor.editorHeight}}px{{/if}}">
    {{> @macro/front-end/editors/include-editor.hbs type=item.psEditor.editorType item=item ctrlType="form"}}
    </div>
  {{/if}}
{{/if}}
</AppFormItem>
{{/neq}}
