Replaces JSON textarea with professional Excel-like spreadsheet interface for managing product variant properties. Features: - Handsontable 14.6.1 spreadsheet component - Property presets (Size, Color, Material, Storage, Custom) - Inline cell editing with Tab/Enter navigation - Context menu for add/remove rows and columns - Keyboard shortcuts (Ctrl+D delete, Ctrl+Enter save, Ctrl+Z undo) - Mobile touch gestures (swipe to delete rows) - Automatic JSON serialization on form submit - Form validation before saving - Comprehensive user guide documentation Files Changed: - LittleShop/package.json: NPM package management setup - LittleShop/wwwroot/js/variant-editor.js: 400-line spreadsheet editor module - LittleShop/wwwroot/lib/handsontable/: Handsontable library (Community Edition) - LittleShop/wwwroot/lib/hammerjs/: Hammer.js touch gesture library - LittleShop/Areas/Admin/Views/VariantCollections/Edit.cshtml: Spreadsheet UI integration - VARIANT_COLLECTIONS_USER_GUIDE.md: Complete user guide (18+ pages) Technical Details: - Excel-like editing experience (no more manual JSON editing) - Mobile-first responsive design - Browser compatibility: Chrome 90+, Firefox 88+, Edge 90+, Safari 14+ - Touch-optimized for mobile administration - Automatic data validation and error handling
72 lines
1.7 KiB
JavaScript
72 lines
1.7 KiB
JavaScript
var changelog = require( "changelogplease" );
|
|
var gittags = require( "git-tags" ).get( function( error, tags ) {
|
|
if ( error ) {
|
|
throw error
|
|
}
|
|
console.log( tags[ 1 ] + ".." + tags[ 0 ] );
|
|
var exclude = [ "Merge", "Whitespace", "Fixup", "Cleanup", "Formatting", "Ignore" ];
|
|
changelog( {
|
|
ticketUrl: "https://github.com/hammerjs/hammer.js/issues/{id}",
|
|
commitUrl: "https://github.com/hammerjs/hammerjs/commit/{id}",
|
|
sort: false,
|
|
repo: "./",
|
|
committish: tags[ 1 ] + ".." + tags[ 0 ]
|
|
}, function( error, log ) {
|
|
if ( error ) {
|
|
throw error;
|
|
}
|
|
log = parseLog( log );
|
|
console.log( log );
|
|
} );
|
|
function parseLog( log ) {
|
|
var lines = log.split( "\n" );
|
|
var newLog = [];
|
|
var log = [];
|
|
var currentComponent;
|
|
|
|
|
|
lines.shift();
|
|
lines.forEach( function( line ) {
|
|
var newLine = parseLine( line );
|
|
if ( newLine ) {
|
|
log.push( line );
|
|
}
|
|
} );
|
|
var log = log.join( "\n" );
|
|
return log.replace( /\*/g, "-" ).replace( /__TICKETREF__,/g, "" );
|
|
}
|
|
function parseLine( line ) {
|
|
var parts = getParts( line );
|
|
|
|
if ( exclude.indexOf( parts.component ) > -1 ) {
|
|
return false;
|
|
}
|
|
return parts;
|
|
}
|
|
function getParts( line ) {
|
|
var parts = line.split( ":" );
|
|
var component = "";
|
|
var message;
|
|
var commits = line.match( /\{\{([A-Za-z0-9 ]){0,99}\}\}/ )
|
|
|
|
if ( parts.length > 1 && parts[ 0 ].length <= 20 ) {
|
|
component = parts[ 0 ];
|
|
parts.shift();
|
|
message = parts.join( ":" );
|
|
} else {
|
|
parts = line.split( " " );
|
|
component = parts[ 1 ];
|
|
parts.shift();
|
|
message = parts.join( " " );
|
|
}
|
|
|
|
if ( component ) {
|
|
component = component.replace( /\* |,/, "" );
|
|
}
|
|
return {
|
|
component: component,
|
|
message: message
|
|
};
|
|
}
|
|
} );
|