{"version":3,"file":"order_shipment_transition_state-8fb090bc.js","sources":["../../../app/javascript/src/shared/vue_components/common/k_step_progress/indicator-bar.vue","../../../app/javascript/src/shared/vue_components/common/k-step-progress.vue","../../../app/javascript/src/shared/vue_components/order_shipment/common/step-progress-bar.vue","../../../app/javascript/src/shared/resource_models/order_shipment_transition_state.js"],"sourcesContent":["\n//- This component is used at order progress\n\n//- TODO: Child points should be nested inside the `.point` elements\n//- TODO: The height should automatically adjust its growth instead of using absolute positioning\n//- TODO: Position default can be removed\n.vc-k-step-progress-indicator-bar(:class=\"containerClass\")\n .bar(:style=\"`--bar-width: ${barWidth}%`\")\n .points\n .point.start-point\n\n template(v-for=\"(step, index) in steps\")\n .point.value-point(\n :style=\"`--point-position: ${step.position}%;`\"\n :class=\"{ 'passed-point': index < value, 'current-point': index === value, 'unreached-point': index > value }\"\n )\n .label-wrapper\n .label(v-if=\"step.label\") {{ step.label }}\n slot(\n name=\"label\"\n :step=\"step.step\"\n )\n\n //- for child points\n .child-points-wrapper(\n v-if=\"step.substeps.length > 0\"\n :style=\"childPointsStyleFor(step, index)\"\n :class=\"{ 'passed-point': index < value, 'current-point': index === value, 'unreached-point': index > value }\"\n )\n .child-bar(\n :style=\"`--child-bar-width: ${step.substeps[step.substeps.length - 1].position}%`\"\n )\n .child-point(\n v-for=\"(substep, subindex) in step.substeps\"\n :key=\"subindex\"\n :style=\"`--child-point-position: ${substep.position}%`\"\n )\n .label-wrapper\n .label(v-if=\"substep.label\") {{ substep.label }}\n slot(\n name=\"sublabel\"\n :step=\"step.step\"\n :substep=\"substep.step\"\n )\n\n\n\n\n\n","\n.k-step-progress(\n :is=\"component\"\n :value=\"value\"\n :steps=\"convertedSteps\"\n :options=\"options\"\n)\n template(\n v-if=\"$scopedSlots.label\"\n #label=\"props\"\n )\n slot(\n name=\"label\"\n :step=\"props.step\"\n )\n template(\n v-if=\"$scopedSlots.sublabel\"\n #sublabel=\"props\"\n )\n slot(\n name=\"sublabel\"\n :step=\"props.step\"\n :substep=\"props.substep\"\n )\n\n\n\n","\nk-step-progress(\n style-type=\"indicator-bar\"\n :value=\"value\"\n :steps=\"steps\"\n :options=\"{ colorType: props.orderShipment.state === 'canceled' ? 'is-black' : 'is-ci' }\"\n)\n template(#label=\"props\")\n label.label(v-if=\"props.step === stateFor('ready')\")\n span.tag.is-warning {{ aasmStateLocaleText('order/shipment', 'state', 'ready') }}\n label.label(v-if=\"props.step === stateFor('tallying')\")\n span.tag.is-info {{ aasmStateLocaleText('order/shipment', 'state', 'tallying') }}\n label.label(v-if=\"props.step === stateFor('shipped')\")\n span.tag.is-success {{ aasmStateLocaleText('order/shipment', 'state', 'shipped') }}\n label.label(v-if=\"props.step === stateFor('canceled')\")\n span.tag.is-danger {{ aasmStateLocaleText('order/shipment', 'state', 'canceled') }}\n template(#sublabel=\"props\")\n template(v-if=\"props.step === stateFor('tallying')\")\n span.tag.is-info.is-light\n | {{ transitionStateFor(orderShipment.transition_state_ids[props.substep]).name }}\n\n\n\n","import ResourceModelBase from 'odd-resource_model'\n\nconst OPTIONS = {\n apiPath: '/api',\n apiVersion: 'v1',\n scope: 'web',\n resourceType: 'order_shipment_transition_states',\n attributes: ['id', 'name', 'created_at', 'updated_at'],\n editableAttributes: ['name']\n}\n\nexport default class OrderShipmentTransitionState extends ResourceModelBase {\n constructor(attributes = {}) {\n super(OPTIONS, attributes)\n }\n\n // extra methods or helpers here...\n}\n"],"names":["COLOR_TYPE_MAP","convertedOptions","computed","props","containerClass","barWidth","step","index","childPointsStyleFor","point","nextPoint","STYLE_TYPE_MAP","IndicatorBar","component","convertedSteps","substep","subindex","STATE_MAP","store","useStore","stateFor","state","value","steps","id","position","transitionStateFor","OPTIONS","OrderShipmentTransitionState","ResourceModelBase","attributes"],"mappings":"6jDAiDMA,EAAiB,CACrB,QAAS,QACT,WAAY,UACd,EAmBMC,EAAmBC,EAAS,KACzB,CACL,oBAAqBC,EAAM,QAAQ,qBAAuB,GAC1D,uBAAwBA,EAAM,QAAQ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