@stratusjs/angular 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/environment', '@stratusjs/core/misc', '@stratusjs/angularjs/services/model', '@stratusjs/angularjs/services/registry', '@stratusjs/core/events/eventManager', 'html2pdf', 'font-awesome', 'froala-plugins', 'froala-embedly', 'froala-font-awesome', 'froala-image-tui', 'froala-editor', '@stratusjs/core/datastore/xhr', 'toastify-js', '@agentepsilon/decko', '@stratusjs/angular/core/root.component', '@stratusjs/angularjs/services/collection', 'zone.js/dist/zone'], (function (exports) {
2
2
  'use strict';
3
- var Stratus, _, uniqueId$3, snakeCase, head, isEmpty, isUndefined, isString, extend$1, debounce$2, isNumber, isBoolean, isArray$1, clone, isFunction$1, set, isNil, includes, isObject$2, assignIn, forEach, cookie, isJSON, safeUniqueId, Model, Registry, EventManager$1, FroalaEditor, XHR, Toastify, debounce$1, RootComponent$1, Collection;
3
+ var Stratus, _, uniqueId$3, snakeCase, head, isEmpty, isUndefined, isString, extend$1, get, forEach, isObject$2, isArray$1, has$2, sortBy, size, toNumber$1, isNumber, set, assignIn, clone, max, debounce$2, isBoolean, isFunction$1, isNil, includes, cookie, isJSON, safeUniqueId, serializeUrlParams, Model, Registry, EventManager$1, FroalaEditor, XHR, Toastify, debounce$1, RootComponent$1, Collection;
4
4
  return {
5
5
  setters: [function (module) {
6
6
  Stratus = module.Stratus;
@@ -13,23 +13,30 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
13
13
  isUndefined = module.isUndefined;
14
14
  isString = module.isString;
15
15
  extend$1 = module.extend;
16
- debounce$2 = module.debounce;
17
- isNumber = module.isNumber;
18
- isBoolean = module.isBoolean;
16
+ get = module.get;
17
+ forEach = module.forEach;
18
+ isObject$2 = module.isObject;
19
19
  isArray$1 = module.isArray;
20
+ has$2 = module.has;
21
+ sortBy = module.sortBy;
22
+ size = module.size;
23
+ toNumber$1 = module.toNumber;
24
+ isNumber = module.isNumber;
25
+ set = module.set;
26
+ assignIn = module.assignIn;
20
27
  clone = module.clone;
28
+ max = module.max;
29
+ debounce$2 = module.debounce;
30
+ isBoolean = module.isBoolean;
21
31
  isFunction$1 = module.isFunction;
22
- set = module.set;
23
32
  isNil = module.isNil;
24
33
  includes = module.includes;
25
- isObject$2 = module.isObject;
26
- assignIn = module.assignIn;
27
- forEach = module.forEach;
28
34
  }, function (module) {
29
35
  cookie = module.cookie;
30
36
  }, function (module) {
31
37
  isJSON = module.isJSON;
32
38
  safeUniqueId = module.safeUniqueId;
39
+ serializeUrlParams = module.serializeUrlParams;
33
40
  }, function (module) {
34
41
  Model = module.Model;
35
42
  }, function (module) {
@@ -84665,7 +84672,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
84665
84672
  const min$c = !cookie('env') ? '.min' : '';
84666
84673
  const localDir$d = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemPackage}/*`].replace(/[^\/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
84667
84674
  const froalaDir = `${Stratus.BaseUrl}${boot.configuration.paths[froalaPackage].replace(/js\/[^\/]*$/, '')}`;
84668
- const has$2 = (object, path) => _.has(object, path) && !_.isEmpty(_.get(object, path));
84675
+ const has$1 = (object, path) => _.has(object, path) && !_.isEmpty(_.get(object, path));
84669
84676
  let EditorComponent = exports('EditorComponent', class EditorComponent extends RootComponent {
84670
84677
  constructor(sanitizer, ref, elementRef, fb, dialog) {
84671
84678
  super();
@@ -84679,7 +84686,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
84679
84686
  this.debug = !!cookie(`debug_${moduleName$9}`);
84680
84687
  this.editor = 'froala';
84681
84688
  this._ = _;
84682
- this.has = has$2;
84689
+ this.has = has$1;
84683
84690
  this.log = console.log;
84684
84691
  this.Stratus = Stratus;
84685
84692
  this.registry = new Registry();
@@ -123078,7 +123085,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123078
123085
  const moduleName$6 = 'media-selector';
123079
123086
  const min$9 = !cookie('env') ? '.min' : '';
123080
123087
  const localDir$a = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$6}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
123081
- const has$1 = (object, path) => _.has(object, path) && !_.isEmpty(_.get(object, path));
123088
+ const has = (object, path) => _.has(object, path) && !_.isEmpty(_.get(object, path));
123082
123089
  let MediaSelectorComponent = exports('MediaSelectorComponent', class MediaSelectorComponent extends RootComponent {
123083
123090
  constructor(iconRegistry, sanitizer, ref, elementRef, viewportRuler) {
123084
123091
  super();
@@ -123089,7 +123096,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123089
123096
  this.viewportRuler = viewportRuler;
123090
123097
  this.title = moduleName$6 + '_component';
123091
123098
  this._ = _;
123092
- this.has = has$1;
123099
+ this.has = has;
123093
123100
  this.log = console.log;
123094
123101
  this.Stratus = Stratus;
123095
123102
  this.registry = new Registry();
@@ -123478,7 +123485,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123478
123485
  const moduleName$5 = 'selector';
123479
123486
  const min$8 = !cookie('env') ? '.min' : '';
123480
123487
  const localDir$9 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$5}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
123481
- const has = (object, path) => _.has(object, path) && !_.isEmpty(_.get(object, path));
123488
+ const hasNotEmpty = (object, path) => has$2(object, path) && !isEmpty(get(object, path));
123482
123489
  let SelectorComponent = exports('SelectorComponent', class SelectorComponent extends RootComponent {
123483
123490
  constructor(iconRegistry, sanitizer, ref, elementRef) {
123484
123491
  super();
@@ -123487,8 +123494,8 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123487
123494
  this.ref = ref;
123488
123495
  this.elementRef = elementRef;
123489
123496
  this.title = moduleName$5 + '_component';
123490
- this._ = _;
123491
- this.has = has;
123497
+ this.get = get;
123498
+ this.has = hasNotEmpty;
123492
123499
  this.log = console.log;
123493
123500
  this.Stratus = Stratus;
123494
123501
  this.selectCtrl = new FormControl();
@@ -123497,10 +123504,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123497
123504
  this.svgIcons = {};
123498
123505
  this.styled = false;
123499
123506
  this.empty = false;
123500
- this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$5)}_component_`);
123507
+ this.uid = uniqueId$3(`sa_${snakeCase(moduleName$5)}_component_`);
123501
123508
  Stratus.Instances[this.uid] = this;
123502
123509
  this.dataSub = new Observable(subscriber => this.dataDefer(subscriber));
123503
- _.forEach({
123510
+ forEach({
123504
123511
  selector_delete: `${Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/delete.svg`,
123505
123512
  selector_status: `${Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/visibility.svg`,
123506
123513
  selector_edit: `${Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/edit.svg`
@@ -123508,15 +123515,15 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123508
123515
  Stratus.Internals.CssLoader(`${localDir$9}${moduleName$5}/${moduleName$5}.component${min$8}.css`)
123509
123516
  .then(() => {
123510
123517
  this.styled = true;
123511
- this.refresh();
123518
+ this.refresh().then();
123512
123519
  })
123513
123520
  .catch((err) => {
123514
123521
  console.warn('Issue detected in CSS Loader for Component:', this);
123515
123522
  console.error(err);
123516
123523
  this.styled = true;
123517
- this.refresh();
123524
+ this.refresh().then();
123518
123525
  });
123519
- this.hydrate(elementRef, sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "ignorePriority", "_", "has", "log", "Stratus", "selectCtrl", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "svgIcons", "styled", "empty", "iconRegistry", "sanitizer", "ref", "elementRef", "drop", "goToUrl", "toggleStatus", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
123526
+ this.hydrate(elementRef, sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "ignorePriority", "get", "has", "log", "Stratus", "selectCtrl", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "svgIcons", "styled", "empty", "iconRegistry", "sanitizer", "ref", "elementRef", "drop", "goToUrl", "toggleStatus", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
123520
123527
  this.fetchData()
123521
123528
  .then(data => {
123522
123529
  if (!data || !(data instanceof EventManager$1)) {
@@ -123529,7 +123536,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123529
123536
  }
123530
123537
  this.dataDefer(this.subscriber);
123531
123538
  this.prioritize();
123532
- this.refresh();
123539
+ this.refresh().then();
123533
123540
  };
123534
123541
  data.on('change', onDataChange);
123535
123542
  onDataChange();
@@ -123543,7 +123550,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123543
123550
  moveItemInArray(models, event.previousIndex, event.currentIndex);
123544
123551
  if (!this.ignorePriority) {
123545
123552
  let priority = 0;
123546
- _.forEach(models, (model) => model.priority = priority++);
123553
+ forEach(models, (model) => model.priority = priority++);
123547
123554
  }
123548
123555
  this.model.trigger('change');
123549
123556
  }
@@ -123555,6 +123562,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123555
123562
  window.open(model.contentType.editUrl + '?id=' + model.id, '_blank');
123556
123563
  }
123557
123564
  toggleStatus(model) {
123565
+ let meta = {};
123566
+ if (!isUndefined(this.data)) {
123567
+ meta = get(this.data, 'meta.data.api');
123568
+ }
123558
123569
  const statusOriginal = model.status;
123559
123570
  model.status = statusOriginal === 1 ? 0 : 1;
123560
123571
  const xhr = new XHR({
@@ -123562,7 +123573,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123562
123573
  url: '/Api/Content/' + model.id,
123563
123574
  data: {
123564
123575
  route: {},
123565
- meta: {},
123576
+ meta,
123566
123577
  payload: {
123567
123578
  status: model.status
123568
123579
  }
@@ -123571,18 +123582,17 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123571
123582
  });
123572
123583
  xhr.send()
123573
123584
  .then((response) => {
123574
- if (!_.isObject(response) || _.get(response, 'meta.status[0].code') !== 'SUCCESS') {
123585
+ if (!isObject$2(response) || get(response, 'meta.status[0].code') !== 'SUCCESS') {
123575
123586
  console.error('error[toggleStatus]:', response);
123576
123587
  model.status = statusOriginal;
123577
- this.refresh();
123588
+ this.refresh().then();
123578
123589
  return;
123579
123590
  }
123580
- console.log('success[toggleStatus]:', response);
123581
123591
  })
123582
123592
  .catch((error) => {
123583
123593
  console.error('error[toggleStatus]:', error);
123584
123594
  model.status = statusOriginal;
123585
- this.refresh();
123595
+ this.refresh().then();
123586
123596
  });
123587
123597
  return;
123588
123598
  }
@@ -123590,7 +123600,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123590
123600
  const models = this.dataRef();
123591
123601
  if (!models || !models.length) {
123592
123602
  console.error('unable to remove model from selection:', models);
123593
- this.refresh();
123603
+ this.refresh().then();
123594
123604
  return;
123595
123605
  }
123596
123606
  let index = models.indexOf(model);
@@ -123598,8 +123608,8 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123598
123608
  const mirrorModels = models
123599
123609
  .map((m) => model.id === m.id ? m : null)
123600
123610
  .filter((m) => m);
123601
- if (_.isArray(mirrorModels) && mirrorModels.length) {
123602
- index = models.indexOf(_.first(mirrorModels));
123611
+ if (isArray$1(mirrorModels) && mirrorModels.length) {
123612
+ index = models.indexOf(head(mirrorModels));
123603
123613
  }
123604
123614
  }
123605
123615
  if (index === -1) {
@@ -123626,14 +123636,14 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123626
123636
  const models = this.dataRef();
123627
123637
  this.empty = !models.length;
123628
123638
  this.subscriber.next(models);
123629
- this.refresh();
123639
+ this.refresh().then();
123630
123640
  }
123631
123641
  dataRef() {
123632
123642
  if (!this.model) {
123633
123643
  return [];
123634
123644
  }
123635
123645
  const models = this.model.get(this.property);
123636
- if (!models || !_.isArray(models)) {
123646
+ if (!models || !isArray$1(models)) {
123637
123647
  return [];
123638
123648
  }
123639
123649
  return models;
@@ -123641,7 +123651,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123641
123651
  onDataChange() {
123642
123652
  this.prioritize();
123643
123653
  this.dataDefer(this.subscriber);
123644
- this.refresh();
123654
+ this.refresh().then();
123645
123655
  }
123646
123656
  prioritize() {
123647
123657
  const models = this.dataRef();
@@ -123650,7 +123660,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123650
123660
  }
123651
123661
  if (!this.ignorePriority) {
123652
123662
  let priority = 0;
123653
- _.forEach(models, (model) => model.priority = priority++);
123663
+ forEach(models, (model) => model.priority = priority++);
123654
123664
  }
123655
123665
  }
123656
123666
  getSvg(url, options) {
@@ -123675,7 +123685,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123675
123685
  if (!options) {
123676
123686
  options = {};
123677
123687
  }
123678
- const uid = this.svgIcons[url] = _.uniqueId('selector_svg');
123688
+ const uid = this.svgIcons[url] = uniqueId$3('selector_svg');
123679
123689
  this.iconRegistry.addSvgIcon(uid, this.sanitizer.bypassSecurityTrustResourceUrl(url), options);
123680
123690
  return uid;
123681
123691
  }
@@ -123976,7 +123986,6 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123976
123986
  this.isInitialized = false;
123977
123987
  this.isDestroyed = false;
123978
123988
  this.isStyled = false;
123979
- this._ = _;
123980
123989
  this.Stratus = Stratus;
123981
123990
  this.registry = new Registry();
123982
123991
  this.onChange = new Subject();
@@ -123996,21 +124005,21 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
123996
124005
  this.isDebug = false;
123997
124006
  }
123998
124007
  ngOnInit() {
123999
- this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$3)}_component_`);
124008
+ this.uid = uniqueId$3(`sa_${snakeCase(moduleName$3)}_component_`);
124000
124009
  Stratus.Instances[this.uid] = this;
124001
- this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "isInitialized", "isDestroyed", "isStyled", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "_", "Stratus", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "unsettled", "svgIcons", "isSingleClick", "dblClickWait", "dropLists", "dropListIdMap", "dropListMap", "expandedNodeSet", "dragging", "expandTimeout", "expandDelay", "dropData", "cdkDropListSortingDisabled", "tree", "treeMap", "metaMap", "dataSource", "treeControl", "isBorder", "isDebug", "iconRegistry", "sanitizer", "backend", "ref", "elementRef", "document", "ngOnInit", "ngOnDestroy", "refresh", "remove", "removeNode", "nodeIsEqual", "fetchData", "dataDefer", "dataRef", "trackDropLists", "setExpanded", "setExpandedClick", "setExpandedDblClick", "onDragDrop", "onDragMove", "showDragData", "clearDragData", "buildNodePatch", "getSvg", "addSvgIcon", "hydrate", "disableRefresh", "stagger", "reloading"]);
124010
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "isInitialized", "isDestroyed", "isStyled", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "Stratus", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "unsettled", "svgIcons", "isSingleClick", "dblClickWait", "dropLists", "dropListIdMap", "dropListMap", "expandedNodeSet", "dragging", "expandTimeout", "expandDelay", "dropData", "cdkDropListSortingDisabled", "tree", "treeMap", "metaMap", "dataSource", "treeControl", "isBorder", "isDebug", "iconRegistry", "sanitizer", "backend", "ref", "elementRef", "document", "ngOnInit", "ngOnDestroy", "refresh", "remove", "removeNode", "nodeIsEqual", "fetchData", "dataDefer", "dataRef", "trackDropLists", "setExpanded", "setExpandedClick", "setExpandedDblClick", "onDragDrop", "onDragMove", "showDragData", "clearDragData", "buildNodePatch", "getSvg", "addSvgIcon", "hydrate", "disableRefresh", "stagger", "reloading"]);
124002
124011
  Stratus.Internals.CssLoader(`${localDir$7}/${moduleName$3}/${moduleName$3}.component${min$6}.css`)
124003
124012
  .then(() => {
124004
124013
  this.isStyled = true;
124005
- this.refresh();
124014
+ this.refresh().then();
124006
124015
  })
124007
124016
  .catch((err) => {
124008
124017
  console.warn('Issue detected in CSS Loader for Component:', this);
124009
124018
  console.error(err);
124010
124019
  this.isStyled = true;
124011
- this.refresh();
124020
+ this.refresh().then();
124012
124021
  });
124013
- _.forEach({
124022
+ forEach({
124014
124023
  tree_check: `${Stratus.BaseUrl}sitetheorycore/images/icons/check.svg`,
124015
124024
  tree_add: `${Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/add.svg`,
124016
124025
  tree_delete: `${Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/delete.svg`,
@@ -124028,7 +124037,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124028
124037
  return;
124029
124038
  }
124030
124039
  this.dataDefer(this.subscriber);
124031
- this.refresh();
124040
+ this.refresh().then();
124032
124041
  };
124033
124042
  data.on('change', onDataChange);
124034
124043
  onDataChange();
@@ -124069,7 +124078,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124069
124078
  this.isDebug = JSON.parse(isDebug);
124070
124079
  }
124071
124080
  this.isInitialized = true;
124072
- this.refresh();
124081
+ this.refresh().then();
124073
124082
  }
124074
124083
  ngOnDestroy() {
124075
124084
  this.isDestroyed = true;
@@ -124078,7 +124087,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124078
124087
  if (this.isDestroyed) {
124079
124088
  return new Promise(resolve => resolve());
124080
124089
  }
124081
- _.forEach(this.metaMap, (meta) => {
124090
+ forEach(this.metaMap, (meta) => {
124082
124091
  if (!meta.component || !('refresh' in meta.component)) {
124083
124092
  return;
124084
124093
  }
@@ -124133,24 +124142,24 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124133
124142
  return this.tree;
124134
124143
  }
124135
124144
  let models = this.collection.models;
124136
- if (!models || !_.isArray(models) || !models.length) {
124145
+ if (!models || !isArray$1(models) || !models.length) {
124137
124146
  return [];
124138
124147
  }
124139
- models = _.sortBy(models, ['data.priority']);
124148
+ models = sortBy(models, ['data.priority']);
124140
124149
  this.metaMap = this.metaMap || {};
124141
124150
  this.treeMap = {};
124142
124151
  this.tree = [];
124143
- _.forEach(models, (model) => {
124144
- const modelId = _.get(model, 'data.id');
124145
- const parentId = _.get(model, 'data.nestParent.id');
124152
+ forEach(models, (model) => {
124153
+ const modelId = get(model, 'data.id');
124154
+ const parentId = get(model, 'data.nestParent.id');
124146
124155
  this.dropListIdMap[`${this.uid}_node_${modelId}_drop_list`] = true;
124147
- if (!_.has(this.metaMap, modelId)) {
124156
+ if (!has$2(this.metaMap, modelId)) {
124148
124157
  this.metaMap[modelId] = {
124149
124158
  id: modelId,
124150
124159
  expanded: true
124151
124160
  };
124152
124161
  }
124153
- if (!_.has(this.treeMap, modelId)) {
124162
+ if (!has$2(this.treeMap, modelId)) {
124154
124163
  this.treeMap[modelId] = {
124155
124164
  id: modelId,
124156
124165
  model,
@@ -124161,7 +124170,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124161
124170
  this.treeMap[modelId].model = model;
124162
124171
  this.treeMap[modelId].meta = this.metaMap[modelId];
124163
124172
  if (parentId) {
124164
- if (!_.has(this.treeMap, parentId)) {
124173
+ if (!has$2(this.treeMap, parentId)) {
124165
124174
  this.treeMap[parentId] = {
124166
124175
  id: parentId,
124167
124176
  model: null,
@@ -124180,7 +124189,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124180
124189
  }
124181
124190
  trackDropLists() {
124182
124191
  this.dropLists = [];
124183
- _.forEach(this.dropListIdMap, (value, key) => {
124192
+ forEach(this.dropListIdMap, (value, key) => {
124184
124193
  if (!value) {
124185
124194
  return;
124186
124195
  }
@@ -124197,13 +124206,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124197
124206
  });
124198
124207
  }
124199
124208
  setExpanded(expanded) {
124200
- if (!this.metaMap || !_.size(this.metaMap)) {
124209
+ if (!this.metaMap || !size(this.metaMap)) {
124201
124210
  return;
124202
124211
  }
124203
- _.forEach(this.metaMap, (nodeMeta) => {
124212
+ forEach(this.metaMap, (nodeMeta) => {
124204
124213
  nodeMeta.expanded = expanded;
124205
124214
  });
124206
- this.refresh();
124215
+ this.refresh().then();
124207
124216
  }
124208
124217
  setExpandedClick(expanded) {
124209
124218
  this.isSingleClick = true;
@@ -124235,10 +124244,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124235
124244
  }
124236
124245
  this.unsettled = true;
124237
124246
  const targetDropNode = (this.dropData.targetId && this.dropData.targetId in this.treeMap) ?
124238
- this.treeMap[_.toNumber(this.dropData.targetId)] : null;
124247
+ this.treeMap[toNumber$1(this.dropData.targetId)] : null;
124239
124248
  if (cookie('env') && this.isDebug) {
124240
124249
  console.group('onDragDrop()');
124241
- _.forEach([
124250
+ forEach([
124242
124251
  `model drop: ${targetNode.model.get('name')}`,
124243
124252
  `list shift: ${event.container.element.nativeElement.id} -> ${event.previousContainer.element.nativeElement.id}`,
124244
124253
  `index change (event): ${event.previousIndex} -> ${event.currentIndex}`,
@@ -124310,10 +124319,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124310
124319
  break;
124311
124320
  }
124312
124321
  }
124313
- if (_.isNumber(targetDropIndex)) {
124322
+ if (isNumber(targetDropIndex)) {
124314
124323
  moveItemInArray(branch, event.previousIndex, targetDropIndex);
124315
124324
  let priority = 0;
124316
- _.forEach(branch, (node) => {
124325
+ forEach(branch, (node) => {
124317
124326
  if (!node.model || !node.model.set) {
124318
124327
  return;
124319
124328
  }
@@ -124385,7 +124394,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124385
124394
  return null;
124386
124395
  }
124387
124396
  const nodePatch = {};
124388
- _.forEach([
124397
+ forEach([
124389
124398
  'id',
124390
124399
  'name'
124391
124400
  ], (key) => {
@@ -124393,7 +124402,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124393
124402
  if (!value) {
124394
124403
  return;
124395
124404
  }
124396
- _.set(nodePatch, key, value);
124405
+ set(nodePatch, key, value);
124397
124406
  });
124398
124407
  return nodePatch;
124399
124408
  }
@@ -124419,7 +124428,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124419
124428
  if (!options) {
124420
124429
  options = {};
124421
124430
  }
124422
- const uid = this.svgIcons[url] = _.uniqueId('selector_svg');
124431
+ const uid = this.svgIcons[url] = uniqueId$3('selector_svg');
124423
124432
  this.iconRegistry.addSvgIcon(uid, this.sanitizer.bypassSecurityTrustResourceUrl(url), options);
124424
124433
  return uid;
124425
124434
  }
@@ -124512,17 +124521,22 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124512
124521
  this.isInitialized = false;
124513
124522
  this.isDestroyed = false;
124514
124523
  this.isStyled = false;
124515
- this._ = _;
124524
+ this.get = get;
124516
124525
  this.Stratus = Stratus;
124517
124526
  this.apiBase = '/Api/Content';
124518
124527
  this.isSingleContentLoading = false;
124519
124528
  this.limit = 20;
124520
124529
  this.isContentLoading = false;
124521
124530
  this.isContentLoaded = false;
124522
- this.basicContentQueryAttributes = 'options[isContent]=null&options[isCollection]=null&options[showRoutable]=true&options[showRouting]=true';
124531
+ this.basicContentQueryAttributesObject = {
124532
+ isContent: true,
124533
+ isCollection: null,
124534
+ showRoutable: true,
124535
+ showRouting: true
124536
+ };
124523
124537
  }
124524
124538
  ngOnInit() {
124525
- this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$2)}_component_`);
124539
+ this.uid = uniqueId$3(`sa_${snakeCase(moduleName$2)}_component_`);
124526
124540
  Stratus.Instances[this.uid] = this;
124527
124541
  Stratus.Internals.CssLoader(`${localDir$6}/${parentModuleName$1}/${moduleName$2}.component${min$5}.css`)
124528
124542
  .then(() => {
@@ -124545,7 +124559,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124545
124559
  .get('contentSelectorInput')
124546
124560
  .valueChanges
124547
124561
  .pipe(debounceTime(300), tap(() => this.isContentLoading = true), switchMap((value) => {
124548
- if (_.isString(value)) {
124562
+ if (isString(value)) {
124549
124563
  this.lastContentSelectorQuery = this.getQueryUrl(value);
124550
124564
  }
124551
124565
  else {
@@ -124569,11 +124583,11 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124569
124583
  .get(this.getQueryUrl(null, this.data.content.id))
124570
124584
  .pipe(finalize(() => this.isSingleContentLoading = false))
124571
124585
  .subscribe((response) => {
124572
- if (!response.ok || response.status !== 200 || _.isEmpty(response.body)) {
124586
+ if (!response.ok || response.status !== 200 || isEmpty(response.body)) {
124573
124587
  return null;
124574
124588
  }
124575
- const payload = _.get(response.body, 'payload') || response.body;
124576
- if (_.isEmpty(payload) || Array.isArray(payload) || !_.isObject(payload)) {
124589
+ const payload = get(response.body, 'payload') || response.body;
124590
+ if (isEmpty(payload) || Array.isArray(payload) || !isObject$2(payload)) {
124577
124591
  return null;
124578
124592
  }
124579
124593
  this.contentEntity = payload;
@@ -124581,7 +124595,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124581
124595
  this.dialogContentForm
124582
124596
  .get('contentSelectorInput')
124583
124597
  .patchValue(this.contentEntity);
124584
- this.refresh();
124598
+ this.refresh().then();
124585
124599
  return this.contentEntity;
124586
124600
  });
124587
124601
  }
@@ -124606,19 +124620,19 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124606
124620
  if (!content) {
124607
124621
  return;
124608
124622
  }
124609
- const routing = _.get(content, 'routing[0].url');
124610
- const routingText = !_.isUndefined(routing) ? ` (/${routing})` : ' (No route!)';
124611
- const contentId = _.get(content, 'id');
124612
- const contentIdText = !_.isUndefined(contentId) ? `Content: ${contentId}` : null;
124613
- return (_.get(content, 'version.title') || contentIdText) + routingText;
124623
+ const routing = get(content, 'routing[0].url');
124624
+ const routingText = !isUndefined(routing) ? ` (/${routing})` : ' (No route!)';
124625
+ const contentId = get(content, 'id');
124626
+ const contentIdText = !isUndefined(contentId) ? `Content: ${contentId}` : null;
124627
+ return (get(content, 'version.title') || contentIdText) + routingText;
124614
124628
  }
124615
124629
  handleContent(response) {
124616
- if (!response.ok || response.status !== 200 || _.isEmpty(response.body)) {
124630
+ if (!response.ok || response.status !== 200 || isEmpty(response.body)) {
124617
124631
  this.filteredContent = [];
124618
124632
  return this.filteredContent;
124619
124633
  }
124620
- const payload = _.get(response.body, 'payload') || response.body;
124621
- if (_.isEmpty(payload) || !Array.isArray(payload)) {
124634
+ const payload = get(response.body, 'payload') || response.body;
124635
+ if (isEmpty(payload) || !Array.isArray(payload)) {
124622
124636
  this.filteredContent = [];
124623
124637
  return this.filteredContent;
124624
124638
  }
@@ -124651,9 +124665,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124651
124665
  return this.tree.getSvg(url, options);
124652
124666
  }
124653
124667
  getQueryUrl(query, id) {
124654
- query = (!_.isString(query) || _.isEmpty(query)) ? '' : query;
124655
- id = !_.isString(id) && !_.isNumber(id) ? '' : `/${id}`;
124656
- return `${this.apiBase}${id}?limit=${this.limit}&${this.basicContentQueryAttributes}&q=${query}`;
124668
+ const fullApiOptions = { options: assignIn(this.basicContentQueryAttributesObject, this.data.api) };
124669
+ query = (!isString(query) || isEmpty(query)) ? '' : query;
124670
+ id = !isString(id) && !isNumber(id) ? '' : `/${id}`;
124671
+ return `${this.apiBase}${id}?limit=${this.limit}&${serializeUrlParams(fullApiOptions)}&q=${query}`;
124657
124672
  }
124658
124673
  selectedOnTop(list, selected) {
124659
124674
  if (!list || !list.length) {
@@ -124662,7 +124677,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124662
124677
  if (!selected || !selected.id) {
124663
124678
  return list;
124664
124679
  }
124665
- const orderedList = _.clone(list);
124680
+ const orderedList = clone(list);
124666
124681
  const index = list.findIndex((v) => v.id === selected.id);
124667
124682
  if (index === -1) {
124668
124683
  orderedList.unshift(selected);
@@ -124705,28 +124720,27 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124705
124720
  this.isInitialized = false;
124706
124721
  this.isDestroyed = false;
124707
124722
  this.isStyled = false;
124708
- this._ = _;
124709
124723
  this.Stratus = Stratus;
124710
124724
  this.hasChild = (node) => node.children && node.children.length > 0;
124711
124725
  this.isExpanded = (node) => node.meta ? node.meta.expanded : true;
124712
124726
  }
124713
124727
  ngOnInit() {
124714
- this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$1)}_component_`);
124728
+ this.uid = uniqueId$3(`sa_${snakeCase(moduleName$1)}_component_`);
124715
124729
  Stratus.Instances[this.uid] = this;
124716
124730
  Stratus.Internals.CssLoader(`${localDir$5}/${parentModuleName}/${moduleName$1}.component${min$4}.css`)
124717
124731
  .then(() => {
124718
124732
  this.isStyled = true;
124719
- this.refresh();
124733
+ this.refresh().then();
124720
124734
  })
124721
124735
  .catch((err) => {
124722
124736
  console.warn('Issue detected in CSS Loader for Component:', this);
124723
124737
  console.error(err);
124724
124738
  this.isStyled = true;
124725
- this.refresh();
124739
+ this.refresh().then();
124726
124740
  });
124727
124741
  this.node.meta.component = this;
124728
124742
  this.isInitialized = true;
124729
- this.refresh();
124743
+ this.refresh().then();
124730
124744
  this.onPostPersist();
124731
124745
  }
124732
124746
  ngOnDestroy() {
@@ -124770,7 +124784,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124770
124784
  if (!this.node || !this.node.model) {
124771
124785
  return;
124772
124786
  }
124773
- this.node.model.destroy();
124787
+ this.node.model.destroy().then();
124774
124788
  });
124775
124789
  return dialog;
124776
124790
  }
@@ -124789,7 +124803,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124789
124803
  return;
124790
124804
  }
124791
124805
  this.node.meta.expanded = !this.node.meta.expanded;
124792
- this.refresh();
124806
+ this.refresh().then();
124793
124807
  }
124794
124808
  toggleExpandedClick() {
124795
124809
  this.isSingleClick = true;
@@ -124805,7 +124819,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124805
124819
  this.toggleExpanded();
124806
124820
  }
124807
124821
  openDialog() {
124808
- if (!this.node.model || !_.has(this.node.model, 'data')) {
124822
+ if (!this.node.model || !has$2(this.node.model, 'data')) {
124809
124823
  return;
124810
124824
  }
124811
124825
  const dialogRef = this.dialog.open(TreeDialogComponent, {
@@ -124821,6 +124835,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124821
124835
  id: this.node.model.data.id || null,
124822
124836
  name: this.node.model.data.name || '',
124823
124837
  target: this.node.model.data.url ? 'url' : 'content',
124838
+ api: this.tree.api,
124824
124839
  content: this.node.model.data.content || null,
124825
124840
  url: this.node.model.data.url || null,
124826
124841
  browserTarget: this.node.model.data.browserTarget || null,
@@ -124830,10 +124845,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124830
124845
  nestParent: this.node.model.data.nestParent || null,
124831
124846
  }
124832
124847
  });
124833
- this.refresh();
124848
+ this.refresh().then();
124834
124849
  const that = this;
124835
124850
  dialogRef.afterClosed().subscribe((result) => {
124836
- if (!result || _.isEmpty(result)) {
124851
+ if (!result || isEmpty(result)) {
124837
124852
  return;
124838
124853
  }
124839
124854
  this.tree.unsettled = true;
@@ -124845,19 +124860,19 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124845
124860
  'browserTarget'
124846
124861
  ];
124847
124862
  attrs.forEach(attr => {
124848
- if (!_.has(result, attr)) {
124863
+ if (!has$2(result, attr)) {
124849
124864
  return;
124850
124865
  }
124851
124866
  if ('content' === attr) {
124852
- const value = _.get(result, attr);
124853
- this.node.model.set(attr, !value ? null : { id: _.get(value, 'id') });
124867
+ const value = get(result, attr);
124868
+ this.node.model.set(attr, !value ? null : { id: get(value, 'id') });
124854
124869
  return;
124855
124870
  }
124856
- this.node.model.set(attr, _.get(result, attr));
124871
+ this.node.model.set(attr, get(result, attr));
124857
124872
  });
124858
- that.refresh();
124859
- that.tree.refresh();
124860
- this.node.model.save();
124873
+ that.refresh().then();
124874
+ that.tree.refresh().then();
124875
+ this.node.model.save().then();
124861
124876
  this.tree.unsettled = false;
124862
124877
  });
124863
124878
  }
@@ -124883,10 +124898,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
124883
124898
  }
124884
124899
  const model = this.node.model;
124885
124900
  model.set('status', model.get('status') ? 0 : 1);
124886
- model.save();
124901
+ model.save().then();
124887
124902
  }
124888
124903
  addChild() {
124889
- let priority = _.max(this.tree.collection.models.filter((model) => {
124904
+ let priority = max(this.tree.collection.models.filter((model) => {
124890
124905
  const nestParent = model.get('nestParent');
124891
124906
  if (!nestParent) {
124892
124907
  return false;
@@ -161335,42 +161350,6 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
161335
161350
  })
161336
161351
  .catch(err => console.error('@stratusjs/angular failed to initialize!', err));
161337
161352
 
161338
- System.register(["quill", "@stratusjs/core/environment"], function (exports_1, context_1) {
161339
- var quill_1, environment_1, Break, Embed, QuillBreak;
161340
- context_1 && context_1.id;
161341
- return {
161342
- setters: [
161343
- function (quill_1_1) {
161344
- quill_1 = quill_1_1;
161345
- },
161346
- function (environment_1_1) {
161347
- environment_1 = environment_1_1;
161348
- }
161349
- ],
161350
- execute: function () {
161351
- Break = quill_1.default.import('blots/break');
161352
- Embed = quill_1.default.import('blots/embed');
161353
- QuillBreak = class QuillBreak extends Break {
161354
- length() {
161355
- return 1;
161356
- }
161357
- value() {
161358
- return '\n';
161359
- }
161360
- insertInto(parent, ref) {
161361
- if (environment_1.cookie('env')) {
161362
- console.log('insertInto:', parent, ref);
161363
- }
161364
- Embed.prototype.insertInto.call(this, parent, ref);
161365
- }
161366
- };
161367
- exports_1("QuillBreak", QuillBreak);
161368
- QuillBreak.blotName = 'break';
161369
- QuillBreak.tagName = 'BR';
161370
- }
161371
- };
161372
- });
161373
-
161374
161353
  System.register(["quill"], function (exports_1, context_1) {
161375
161354
  var quill_1, debug, Logger, QuillHtmlEditPlugin;
161376
161355
  context_1 && context_1.id;
@@ -161530,6 +161509,42 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
161530
161509
  };
161531
161510
  });
161532
161511
 
161512
+ System.register(["quill", "@stratusjs/core/environment"], function (exports_1, context_1) {
161513
+ var quill_1, environment_1, Break, Embed, QuillBreak;
161514
+ context_1 && context_1.id;
161515
+ return {
161516
+ setters: [
161517
+ function (quill_1_1) {
161518
+ quill_1 = quill_1_1;
161519
+ },
161520
+ function (environment_1_1) {
161521
+ environment_1 = environment_1_1;
161522
+ }
161523
+ ],
161524
+ execute: function () {
161525
+ Break = quill_1.default.import('blots/break');
161526
+ Embed = quill_1.default.import('blots/embed');
161527
+ QuillBreak = class QuillBreak extends Break {
161528
+ length() {
161529
+ return 1;
161530
+ }
161531
+ value() {
161532
+ return '\n';
161533
+ }
161534
+ insertInto(parent, ref) {
161535
+ if (environment_1.cookie('env')) {
161536
+ console.log('insertInto:', parent, ref);
161537
+ }
161538
+ Embed.prototype.insertInto.call(this, parent, ref);
161539
+ }
161540
+ };
161541
+ exports_1("QuillBreak", QuillBreak);
161542
+ QuillBreak.blotName = 'break';
161543
+ QuillBreak.tagName = 'BR';
161544
+ }
161545
+ };
161546
+ });
161547
+
161533
161548
  System.register(["quill"], function (exports_1, context_1) {
161534
161549
  var quill_1, BaseImage, ATTRIBUTES, QuillImageFormatPlugin;
161535
161550
  context_1 && context_1.id;
@@ -162038,26 +162053,6 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
162038
162053
  };
162039
162054
  });
162040
162055
 
162041
- System.register(["@stratusjs/angular/froala/editor/froala-editor.directive", "@stratusjs/angular/froala/editor/froala-editor.module"], function (exports_1, context_1) {
162042
- context_1 && context_1.id;
162043
- return {
162044
- setters: [
162045
- function (froala_editor_directive_1_1) {
162046
- exports_1({
162047
- "FroalaEditorDirective": froala_editor_directive_1_1["FroalaEditorDirective"]
162048
- });
162049
- },
162050
- function (froala_editor_module_1_1) {
162051
- exports_1({
162052
- "FroalaEditorModule": froala_editor_module_1_1["FroalaEditorModule"]
162053
- });
162054
- }
162055
- ],
162056
- execute: function () {
162057
- }
162058
- };
162059
- });
162060
-
162061
162056
  System.register(["@angular/core", "@stratusjs/angular/froala/editor/froala-editor.directive"], function (exports_1, context_1) {
162062
162057
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
162063
162058
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -162093,6 +162088,26 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
162093
162088
  };
162094
162089
  });
162095
162090
 
162091
+ System.register(["@stratusjs/angular/froala/editor/froala-editor.directive", "@stratusjs/angular/froala/editor/froala-editor.module"], function (exports_1, context_1) {
162092
+ context_1 && context_1.id;
162093
+ return {
162094
+ setters: [
162095
+ function (froala_editor_directive_1_1) {
162096
+ exports_1({
162097
+ "FroalaEditorDirective": froala_editor_directive_1_1["FroalaEditorDirective"]
162098
+ });
162099
+ },
162100
+ function (froala_editor_module_1_1) {
162101
+ exports_1({
162102
+ "FroalaEditorModule": froala_editor_module_1_1["FroalaEditorModule"]
162103
+ });
162104
+ }
162105
+ ],
162106
+ execute: function () {
162107
+ }
162108
+ };
162109
+ });
162110
+
162096
162111
  System.register(["@angular/core"], function (exports_1, context_1) {
162097
162112
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
162098
162113
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -162195,6 +162210,70 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
162195
162210
  };
162196
162211
  });
162197
162212
 
162213
+ FroalaEditor.DEFAULTS = Object.assign(FroalaEditor.DEFAULTS, {});
162214
+ FroalaEditor.PLUGINS.menuButton = function menuButton(editor) {
162215
+ let inputButton;
162216
+ const debug = false;
162217
+ function _init() {
162218
+ inputButton = new InputButtonPlugin({
162219
+ name: 'Menu Button',
162220
+ eventName: 'menu-button',
162221
+ editor,
162222
+ debug
162223
+ });
162224
+ }
162225
+ function onClick() {
162226
+ if (!editor.el) {
162227
+ console.warn('menuButton.onClick(): unable to find element');
162228
+ return;
162229
+ }
162230
+ inputButton.onClick(editor.el);
162231
+ }
162232
+ return {
162233
+ _init,
162234
+ onClick
162235
+ };
162236
+ };
162237
+ if (FroalaEditor.DEFAULTS) {
162238
+ if (typeof FroalaEditor.DEFAULTS.menuButtons === 'undefined') {
162239
+ FroalaEditor.DEFAULTS.menuButtons = [];
162240
+ }
162241
+ FroalaEditor.DEFAULTS.menuButtons.push('menuButton');
162242
+ }
162243
+ FroalaEditor.RegisterCommand('menuButton', {
162244
+ title: 'Insert from Menu Button',
162245
+ undo: false,
162246
+ focus: false,
162247
+ modal: false,
162248
+ refreshAfterCallback: true,
162249
+ callback() {
162250
+ this.menuButton.onClick();
162251
+ },
162252
+ plugin: 'menuButton',
162253
+ });
162254
+ FroalaEditor.DefineIcon('menuButton', { NAME: 'folder', SVG_KEY: 'imageManager' });
162255
+ FroalaEditor.DefineIcon('menuButtonInsert', { NAME: 'plus', SVG_KEY: 'add' });
162256
+ FroalaEditor.DefineIcon('menuButtonDelete', { NAME: 'trash', SVG_KEY: 'remove' });
162257
+ FroalaEditor.RegisterQuickInsertButton('menu', {
162258
+ icon: 'menuButton',
162259
+ title: 'Insert from Menu Button',
162260
+ callback: function menuButtonCallback() {
162261
+ const debug = false;
162262
+ const inputButton = new InputButtonPlugin({
162263
+ name: 'Menu Button',
162264
+ eventName: 'menu-button',
162265
+ editor: this,
162266
+ debug
162267
+ });
162268
+ if (!this.el) {
162269
+ console.warn('menuButton.onClick(): unable to find element');
162270
+ return;
162271
+ }
162272
+ inputButton.onClick(this.el);
162273
+ },
162274
+ undo: true
162275
+ });
162276
+
162198
162277
  /*!
162199
162278
  * froala_editor v3.2.3 (https://www.froala.com/wysiwyg-editor)
162200
162279
  * License https://froala.com/wysiwyg-editor/terms/
@@ -162557,70 +162636,6 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
162557
162636
  };
162558
162637
  });
162559
162638
 
162560
- FroalaEditor.DEFAULTS = Object.assign(FroalaEditor.DEFAULTS, {});
162561
- FroalaEditor.PLUGINS.menuButton = function menuButton(editor) {
162562
- let inputButton;
162563
- const debug = false;
162564
- function _init() {
162565
- inputButton = new InputButtonPlugin({
162566
- name: 'Menu Button',
162567
- eventName: 'menu-button',
162568
- editor,
162569
- debug
162570
- });
162571
- }
162572
- function onClick() {
162573
- if (!editor.el) {
162574
- console.warn('menuButton.onClick(): unable to find element');
162575
- return;
162576
- }
162577
- inputButton.onClick(editor.el);
162578
- }
162579
- return {
162580
- _init,
162581
- onClick
162582
- };
162583
- };
162584
- if (FroalaEditor.DEFAULTS) {
162585
- if (typeof FroalaEditor.DEFAULTS.menuButtons === 'undefined') {
162586
- FroalaEditor.DEFAULTS.menuButtons = [];
162587
- }
162588
- FroalaEditor.DEFAULTS.menuButtons.push('menuButton');
162589
- }
162590
- FroalaEditor.RegisterCommand('menuButton', {
162591
- title: 'Insert from Menu Button',
162592
- undo: false,
162593
- focus: false,
162594
- modal: false,
162595
- refreshAfterCallback: true,
162596
- callback() {
162597
- this.menuButton.onClick();
162598
- },
162599
- plugin: 'menuButton',
162600
- });
162601
- FroalaEditor.DefineIcon('menuButton', { NAME: 'folder', SVG_KEY: 'imageManager' });
162602
- FroalaEditor.DefineIcon('menuButtonInsert', { NAME: 'plus', SVG_KEY: 'add' });
162603
- FroalaEditor.DefineIcon('menuButtonDelete', { NAME: 'trash', SVG_KEY: 'remove' });
162604
- FroalaEditor.RegisterQuickInsertButton('menu', {
162605
- icon: 'menuButton',
162606
- title: 'Insert from Menu Button',
162607
- callback: function menuButtonCallback() {
162608
- const debug = false;
162609
- const inputButton = new InputButtonPlugin({
162610
- name: 'Menu Button',
162611
- eventName: 'menu-button',
162612
- editor: this,
162613
- debug
162614
- });
162615
- if (!this.el) {
162616
- console.warn('menuButton.onClick(): unable to find element');
162617
- return;
162618
- }
162619
- inputButton.onClick(this.el);
162620
- },
162621
- undo: true
162622
- });
162623
-
162624
162639
  })
162625
162640
  };
162626
162641
  }));