Skip to content

Releases: green3g/spectre-canjs

Modal api - flexible sizing and class names

13 Apr 02:30
Compare
Choose a tag to compare
  • remove small and replace with classname

Simpler modal/confirm api

08 Feb 21:44
Compare
Choose a tag to compare

Confirming and displaying modal data is much easier now. Methods have been removed from modal in favor of stateful properties for controlling display of modals.

simple confirm function using modal dialog:

import ConfirmDialog from 'spectre-canjs/sp-confirm/sp-confirm';

function confirm(content, viewModel = {}, scope = {}) {
    viewModel.active = true;
    const confirm = new ConfirmDialog({
        content,
        viewModel,
        scope: {
        },
    });
    document.body.appendChild(confirm.element);
    return confirm.viewModel.promise.then((outcome) => {
        document.body.removeChild(confirm.element);
        return confirm.viewModel;
    });
}

Usage:

const {outcome} = await confirm('<h1>Are you sure about this????</h1>', {
// viewmodel properties
    title: 'A dangerous action'
});
if(outcome.state === 'accepted'){
    // do dangerous things
} else if(outcome.state === 'rejected'){
    // user cancelled or closed the dialog
}

Can-query compatibility

24 Jan 21:57
Compare
Choose a tag to compare

Updates to sp-admin component to use can-query parameters and can-query compatibility.

CanJS for...of updates

13 Sep 03:30
Compare
Choose a tag to compare

can-stache support for using {{#for(object of objects)}} in all components. Requires 4.11 version of can-stache.

Breaking changes

  • all components use new for of tags in can-stache.
  • table components no longer use ../object for rows and columns. Instead, object[field.name] works. (see docs for details)

SP-File-List Drag n' drop enhancements

05 Sep 02:48
Compare
Choose a tag to compare

SP file list component now supports drag and drop from files. There's also a user friendly upload button.

img-list

CanJS 5.0

04 Aug 16:20
Compare
Choose a tag to compare

Updated packages to CanJS 5.0. Should be an easy upgrade with no breaking changes.

Cascading select dropdowns

02 Apr 19:05
Compare
Choose a tag to compare

Clear Value button helper on text input

20 Mar 20:01
Compare
Choose a tag to compare

CanJS 4.0 Compatibility

03 Feb 19:32
Compare
Choose a tag to compare

Breaking Changes

  • CanJS 4.0 - All packages must use canjs 4 compatible packages in order to use v2.0

  • Remove deprecated components

    • sp-file-field: replaced with sp-dropzone-field
    • sp-date-field: use onInsert in field config instead to initialize a datepicker or something
    • sp-menu: use sp-tab-container instead
  • Other changes:

  • sp-confirm: no longer exports a promise, just use events to register accept/reject

  • Using fields in sp-form is more customizable. Either pass editTag (string) to the field prop, or editComponent (stache function) to sp-form.fields to have field templates rendered.

Enhancements

  • New Components:
    • sp-dropdzone-field: a file upload field using Dropzone
    • sp-file-list: A file list that can display images and provides a slot for "actions" on the files.

Filter and Sort Enhancements

02 Jun 16:12
Compare
Choose a tag to compare

This version brings several useful enhancements to the data-admin.

  • Fade effect when data is in loading state
  • Lots of minor non-breaking code cleanups

Sorting enhancements

  • Sorting can now be cleared using the small "x" icon that appears
  • Sorting can be disabled on columns using sort: false in the field properties

image

Filtering enhancements

  • Filters can be created on views, but not visible to the user using visible: false in the field properties
  • Filters can be pinned, to allow modifying values, but not allowing them to be removed

image