File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/variations.tar
block.json 0000644 00000001316 15155713304 0006536 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "woocommerce/product-variations-fields",
"title": "Product variations fields",
"category": "woocommerce",
"description": "The product variations.",
"keywords": ["products", "variations"],
"textdomain": "default",
"attributes": {
"description": {
"type": "string",
"__experimentalRole": "content"
}
},
"supports": {
"align": false,
"html": false,
"multiple": false,
"reusable": false,
"inserter": false,
"lock": false,
"__experimentalToolbar": false
},
"editorStyle": "file:./editor.css"
}
edit.js 0000644 00000006604 15155713304 0006041 0 ustar 00 "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const classnames_1=__importDefault(require("classnames")),components_1=require("@wordpress/components"),tracks_1=require("@woocommerce/tracks"),element_1=require("@wordpress/element"),i18n_1=require("@wordpress/i18n"),block_editor_1=require("@wordpress/block-editor"),core_data_1=require("@wordpress/core-data"),sanitize_html_1=require("../../utils/sanitize-html"),empty_variations_image_1=require("./empty-variations-image"),new_attribute_modal_1=require("../../components/attribute-control/new-attribute-modal"),use_product_attributes_1=require("../../hooks/use-product-attributes"),utils_1=require("../../components/attribute-control/utils"),use_product_variations_helper_1=require("../../hooks/use-product-variations-helper"),utils_2=require("../../utils"),constants_1=require("../../constants");function Edit({attributes:e}){const{description:t}=e,{generateProductVariations:r}=(0,use_product_variations_helper_1.useProductVariationsHelper)(),[o,i]=(0,element_1.useState)(!1),[a,s]=(0,core_data_1.useEntityProp)("postType","product","attributes"),[,n]=(0,core_data_1.useEntityProp)("postType","product","default_attributes"),{attributes:c,handleChange:u}=(0,use_product_attributes_1.useProductAttributes)({allAttributes:a,isVariationAttributes:!0,productId:(0,core_data_1.useEntityId)("postType","product"),onChange(e,t){s(e),n(t),r(e,t)}}),l=(0,utils_2.hasAttributesUsedForVariations)(a),_=(0,block_editor_1.useBlockProps)({className:(0,classnames_1.default)({"wp-block-woocommerce-product-variations-fields--has-attributes":l})}),d=(0,block_editor_1.useInnerBlocksProps)({className:"wp-block-woocommerce-product-variations-fields__content"},{templateLock:"all"}),m=()=>{i(!1)};return(0,element_1.createElement)("div",{..._},(0,element_1.createElement)("div",{className:"wp-block-woocommerce-product-variations-fields__heading"},(0,element_1.createElement)("div",{className:"wp-block-woocommerce-product-variations-fields__heading-image-container"},(0,element_1.createElement)(empty_variations_image_1.EmptyVariationsImage,null)),(0,element_1.createElement)("p",{className:"wp-block-woocommerce-product-variations-fields__heading-description",dangerouslySetInnerHTML:(0,sanitize_html_1.sanitizeHTML)(t)}),(0,element_1.createElement)("div",{className:"wp-block-woocommerce-product-variations-fields__heading-actions"},(0,element_1.createElement)(components_1.Button,{variant:"primary",onClick:()=>{i(!0)}},(0,i18n_1.__)("Add variation options","woocommerce")))),(0,element_1.createElement)("div",{...d}),o&&(0,element_1.createElement)(new_attribute_modal_1.NewAttributeModal,{title:(0,i18n_1.__)("Add variation options","woocommerce"),description:(0,i18n_1.__)("Select from existing attributes or create new ones to add new variations for your product. You can change the order later.","woocommerce"),createNewAttributesAsGlobal:!0,notice:"",onCancel:()=>{m()},onAdd:e=>{const t=e.filter((e=>!c.some((t=>(0,utils_1.getAttributeId)(e)===(0,utils_1.getAttributeId)(t)))));(0,tracks_1.recordEvent)("product_options_add",{source:constants_1.TRACKS_SOURCE,options:t.map((e=>({attribute:e.name,values:e.options})))}),u(t),m()},selectedAttributeIds:c.map((e=>e.id)),disabledAttributeIds:a.filter((e=>!e.variation)).map((e=>e.id)),termsAutoSelection:"all"}))}exports.Edit=Edit; empty-variations-image.js 0000644 00000017770 15155713304 0011515 0 ustar 00 "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmptyVariationsImage=void 0;const components_1=require("@wordpress/components"),compose_1=require("@wordpress/compose"),element_1=require("@wordpress/element");function EmptyVariationsImage(e){const t=(0,compose_1.useInstanceId)(components_1.G,"clip");return(0,element_1.createElement)(components_1.SVG,{width:"264",height:"167",...e,viewBox:"0 0 264 167",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,element_1.createElement)(components_1.G,{clipPath:`url(#${t})`},(0,element_1.createElement)(components_1.Path,{d:"M38.5556 0.164185C11.3783 0.164185 -3.89877 21.4091 1.5234 37.3916C7.43365 54.8517 25.6968 71.9169 25.6968 85.7696H51.4188C51.4188 71.908 69.6821 54.8517 75.5923 37.3916C81.0145 21.4091 65.7463 0.164185 38.5556 0.164185Z",fill:"#F0F0F0"}),(0,element_1.createElement)(components_1.Path,{d:"M50.5063 48.3114C44.2189 48.3114 40.5228 52.5755 40.5228 59.1735V59.9899C40.079 59.9899 39.6176 59.9899 39.1827 59.9944H38.3486C37.7141 59.9944 37.3325 59.9944 36.5915 59.9944V59.1779C36.5915 52.5755 32.8953 48.3114 26.6124 48.3114C21.0127 48.3114 17.8047 50.4812 17.8047 54.2616C17.8047 57.0969 20.4936 59.0137 25.7915 59.9589C29.0306 60.5357 32.1721 60.6777 35.2781 60.7087V85.7652H36.6003V60.7176C37.3413 60.722 37.7185 60.722 38.3574 60.7176C38.9919 60.7176 39.7906 60.7176 40.5316 60.7176V85.7652H41.8539V60.7132C44.9554 60.6777 48.0969 60.5401 51.3405 59.9633C56.6384 59.0182 59.3273 57.1013 59.3273 54.266C59.3273 50.4856 56.1192 48.3158 50.5196 48.3158L50.5063 48.3114ZM35.2781 59.9855C32.2032 59.95 29.106 59.8124 25.9202 59.2445C21.0172 58.3704 19.6905 56.2938 19.6905 54.1329C19.6905 50.2682 23.5996 49.0347 26.6124 49.0347C32.2342 49.0347 35.2781 53.0148 35.2781 59.169V59.981V59.9855ZM51.1985 59.2445C48.0126 59.8124 44.9155 59.9544 41.845 59.9855V59.1735C41.845 53.0148 44.8889 49.0391 50.5107 49.0391C53.528 49.0391 57.4326 50.2726 57.4326 54.1373C57.4326 56.2982 56.1015 58.3704 51.2029 59.2489L51.1985 59.2445Z",fill:"white"}),(0,element_1.createElement)(components_1.Path,{d:"M38.5585 101.872C45.5248 101.872 51.4173 96.1613 51.4173 89.834H25.6953C25.6953 96.1613 31.5923 101.872 38.5585 101.872Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M57.2858 89.9271H19.832V85.7695H57.2858V89.9271Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M69.5768 106.602H7.63895L0.4375 167L15.2974 151.328H64.2566L69.5768 106.602Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M119.436 122.749C113.97 115.072 110.828 111.394 104.652 111.394C97.8809 111.394 94.908 119.061 98.9724 123.853C103.445 129.125 118.993 134.627 118.993 134.627C118.993 134.627 94.0694 129.923 84.9112 129.923C79.8573 129.923 74.6836 131.96 74.6836 139.135C74.6836 146.31 79.8617 148.346 84.9112 148.346C94.0694 148.346 118.993 143.643 118.993 143.643C118.993 143.643 103.445 149.145 98.9724 154.416C94.908 159.208 97.8764 166.876 104.652 166.876C110.828 166.876 113.97 163.197 119.436 155.521C121.287 152.921 130.707 139.135 130.707 139.135C130.707 139.135 121.287 125.349 119.436 122.749Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M94.2838 102.671L169.715 102.671V80.4849L94.2838 80.4849V102.671Z",fill:"#F0F0F0"}),(0,element_1.createElement)(components_1.Path,{d:"M169.712 0H94.2812V75.4311H169.712V0Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M147.619 49.6336C147.619 44.4156 144.429 39.4194 138.168 36.0116H157.66L139.472 6.00781H124.524L106.336 36.0116H125.828C119.567 39.4194 116.377 44.4156 116.377 49.6336C116.377 55.5394 121.005 61.4985 127.106 64.6888C118.667 62.9849 117.344 69.4232 117.344 69.4232H146.661C146.661 69.4232 145.338 62.9849 136.899 64.6888C143 61.4985 147.628 55.5394 147.628 49.6336H147.619Z",fill:"white"}),(0,element_1.createElement)(components_1.Path,{d:"M147.86 80.7911H94.2812V85.2283H147.86V80.7911Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M169.712 89.8473H94.2812V94.2844H169.712V89.8473Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M136.82 98.9034H94.2812V103.341H136.82V98.9034Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M219.52 167C229.042 167 235.063 158.538 235.063 151.457H203.977C203.977 158.538 209.998 167 219.52 167Z",fill:"#DDDDDD"}),(0,element_1.createElement)(components_1.Path,{d:"M219.516 58.2018C185.027 58.2018 168.143 86.1557 178.522 110.613C185.541 127.141 202.225 125.264 202.225 138.505H236.826C236.826 125.264 253.514 127.141 260.529 110.613C270.903 86.1557 254.006 58.2018 219.516 58.2018Z",fill:"#F0F0F0"}),(0,element_1.createElement)(components_1.Path,{d:"M219.52 167C228.9 167 234.882 158.787 235.059 151.776C235.059 151.67 235.059 142.707 235.059 142.6H203.973C203.973 142.685 203.973 151.63 203.973 151.719C204.115 158.742 210.105 167.004 219.511 167.004L219.52 167Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M240.248 142.596H198.801V138.505H240.248V142.596Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M240.248 149.074H198.801V144.983H240.248V149.074Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M169.656 125.371H142.133V152.894H169.656V125.371Z",fill:"#F0F0F0"}),(0,element_1.createElement)(components_1.Path,{d:"M155.015 146.194L162.181 139.587L147.445 139.663V138.571L162.154 138.647L155.015 132.067L155.676 131.228L163.982 139.055V139.184L155.676 147.033L155.015 146.194Z",fill:"#DDDDDD"}),(0,element_1.createElement)(components_1.Path,{d:"M22.0977 126.533L27.44 141.921L53.5835 112.729",stroke:"white",strokeMiterlimit:"10"}),(0,element_1.createElement)(components_1.Path,{d:"M232.227 110.138C232.227 102.307 227.559 97.4392 220.042 97.4126C220.042 97.4126 220.025 97.4126 220.016 97.4126C220.007 97.4126 219.998 97.4126 219.989 97.4126C212.473 97.4392 207.805 102.928 207.805 110.138C207.805 117.349 212.22 120.774 218.516 125.287C214.704 128.858 212.663 134.516 212.663 138.505H215.867C215.867 134.809 216.572 129.56 220.016 126.462C223.463 129.56 224.164 134.809 224.164 138.505H227.368C227.368 134.516 225.322 128.858 221.515 125.287C227.812 120.778 232.227 116.958 232.227 110.138ZM220.016 124.435C213.773 119.989 209.242 117.158 209.242 110.138C209.242 103.119 213.546 98.7216 220.016 98.7082C226.485 98.7216 230.789 103.354 230.789 110.138C230.789 116.222 226.259 119.989 220.016 124.435Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M250.84 40.1516C250.84 45.9864 246.155 50.7297 240.342 50.8184H199.862C193.97 50.8184 189.195 46.0441 189.195 40.1516C189.195 34.2591 193.97 29.4847 199.862 29.4847H240.36C246.164 29.4847 250.84 34.3256 250.84 40.1516Z",fill:"#F0F0F0"}),(0,element_1.createElement)(components_1.Path,{d:"M240.122 47.7347C244.31 47.7347 247.705 44.3396 247.705 40.1516C247.705 35.9636 244.31 32.5686 240.122 32.5686C235.934 32.5686 232.539 35.9636 232.539 40.1516C232.539 44.3396 235.934 47.7347 240.122 47.7347Z",fill:"#E0E0E0"}),(0,element_1.createElement)(components_1.Path,{d:"M131.996 6.00781H124.524L106.332 36.0116H125.824H138.168H157.661L139.468 6.00781H131.996Z",fill:"#F0F0F0"}),(0,element_1.createElement)(components_1.Path,{d:"M151.608 26.0281H112.384L106.332 36.0116L151.608 26.0281Z",fill:"white"}),(0,element_1.createElement)(components_1.Path,{d:"M145.555 16.0446H118.435L112.383 26.0281L145.555 16.0446Z",fill:"white"}),(0,element_1.createElement)(components_1.Path,{d:"M139.469 6.00781H124.525L118.438 16.0446L139.469 6.00781Z",fill:"white"}),(0,element_1.createElement)(components_1.Path,{d:"M57.4297 42.9647H87.8994",stroke:"#DDDDDD",strokeWidth:"0.71",strokeMiterlimit:"10"}),(0,element_1.createElement)(components_1.Path,{d:"M61.8945 32.1914L83.4412 53.7381",stroke:"#DDDDDD",strokeWidth:"0.71",strokeMiterlimit:"10"}),(0,element_1.createElement)(components_1.Path,{d:"M72.668 27.7321V58.2018",stroke:"#DDDDDD",strokeWidth:"0.71",strokeMiterlimit:"10"})),(0,element_1.createElement)("defs",null,(0,element_1.createElement)("clipPath",{id:t},(0,element_1.createElement)(components_1.Rect,{width:"263.121",height:"167",fill:"white",transform:"translate(0.4375)"}))))}exports.EmptyVariationsImage=EmptyVariationsImage; index.js 0000644 00000001136 15155713304 0006216 0 ustar 00 "use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.init=exports.settings=exports.name=exports.metadata=void 0;const init_block_1=require("../../utils/init-block"),block_json_1=__importDefault(require("./block.json")),edit_1=require("./edit"),{name,...metadata}=block_json_1.default;function init(){return(0,init_block_1.initBlock)({name,metadata,settings:exports.settings})}exports.name=name,exports.metadata=metadata,exports.settings={example:{},edit:edit_1.Edit},exports.init=init; types.js 0000644 00000000104 15155713304 0006245 0 ustar 00 "use strict";Object.defineProperty(exports,"__esModule",{value:!0});