@social-mail/social-mail-client 1.2.133 → 1.2.134

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.
Files changed (27) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +12 -109
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +1 -1
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/site-editor/properties/controls/SizeEditorControl.d.ts +3 -23
  6. package/dist/site-editor/properties/controls/SizeEditorControl.d.ts.map +1 -1
  7. package/dist/site-editor/properties/controls/SizeEditorControl.js +6 -101
  8. package/dist/site-editor/properties/controls/SizeEditorControl.js.map +1 -1
  9. package/dist/site-editor/properties/groups/PositionGroupEditor.d.ts.map +1 -1
  10. package/dist/site-editor/properties/groups/PositionGroupEditor.js +6 -8
  11. package/dist/site-editor/properties/groups/PositionGroupEditor.js.map +1 -1
  12. package/dist/site-editor/properties/groups/SizeGroupEditor.d.ts.map +1 -1
  13. package/dist/site-editor/properties/groups/SizeGroupEditor.js.map +1 -1
  14. package/dist/site-editor/style-editor/StyleEditor.d.ts +2 -0
  15. package/dist/site-editor/style-editor/StyleEditor.d.ts.map +1 -0
  16. package/dist/site-editor/style-editor/StyleEditor.js +24 -0
  17. package/dist/site-editor/style-editor/StyleEditor.js.map +1 -0
  18. package/dist/tsconfig.tsbuildinfo +1 -1
  19. package/dist/web/AppIndex.pack.js +12 -109
  20. package/dist/web/AppIndex.pack.js.map +1 -1
  21. package/dist/web/AppIndex.pack.min.js +1 -1
  22. package/dist/web/AppIndex.pack.min.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/site-editor/properties/controls/SizeEditorControl.tsx +108 -104
  25. package/src/site-editor/properties/groups/PositionGroupEditor.tsx +21 -22
  26. package/src/site-editor/properties/groups/SizeGroupEditor.tsx +0 -1
  27. package/src/site-editor/style-editor/StyleEditor.tsx +22 -0
@@ -40331,112 +40331,17 @@ System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor"
40331
40331
 
40332
40332
  AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/properties/groups/LayoutEditor");
40333
40333
 
40334
- System.register(["tslib", "@web-atoms/core/dist/core/BindableProperty", "@web-atoms/core/dist/web/controls/AtomControl", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/AtomBinder"], function (_export, _context) {
40334
+ System.register(["./PropertyEditor"], function (_export, _context) {
40335
40335
  "use strict";
40336
40336
 
40337
- var __awaiter, __decorate, __metadata, BindableProperty, AtomControl, XNode, Bind, AtomBinder, SizeEditorControl, BindSizeEditor;
40338
- _export("default", void 0);
40337
+ var DropDownProperty, SizeEditorControl;
40339
40338
  return {
40340
- setters: [function (_tslib) {
40341
- __awaiter = _tslib.__awaiter;
40342
- __decorate = _tslib.__decorate;
40343
- __metadata = _tslib.__metadata;
40344
- }, function (_webAtomsCoreDistCoreBindableProperty) {
40345
- BindableProperty = _webAtomsCoreDistCoreBindableProperty.BindableProperty;
40346
- }, function (_webAtomsCoreDistWebControlsAtomControl) {
40347
- AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
40348
- }, function (_webAtomsCoreDistCoreXNode) {
40349
- XNode = _webAtomsCoreDistCoreXNode.default;
40350
- }, function (_webAtomsCoreDistCoreBind) {
40351
- Bind = _webAtomsCoreDistCoreBind.default;
40352
- }, function (_webAtomsCoreDistCoreAtomBinder) {
40353
- AtomBinder = _webAtomsCoreDistCoreAtomBinder.AtomBinder;
40339
+ setters: [function (_PropertyEditor) {
40340
+ DropDownProperty = _PropertyEditor.DropDownProperty;
40354
40341
  }],
40355
40342
  execute: function () {
40356
- _export("BindSizeEditor", BindSizeEditor = Bind.forControl());
40357
- _export("default", SizeEditorControl = class SizeEditorControl extends AtomControl {
40358
- constructor() {
40359
- super(...arguments);
40360
- this._value = "";
40361
- this._isChanging = false;
40362
- this._old = "";
40363
- }
40364
- get isCustom() {
40365
- return this.propertyValue === "custom";
40366
- }
40367
- set isCustom(v) {
40368
- if (v) {
40369
- this.propertyValue = "custom";
40370
- } else {
40371
- this.propertyValue = this._old;
40372
- }
40373
- }
40374
- get propertyValue() {
40375
- return this._value;
40376
- }
40377
- set propertyValue(v) {
40378
- if (this._isChanging) {
40379
- return;
40380
- }
40381
- this._isChanging = true;
40382
- this._old = v && v !== "custom" ? this._value : this._old;
40383
- this._value = v;
40384
- AtomBinder.refreshValue(this, "propertyValue");
40385
- AtomBinder.refreshValue(this, "valueAsNumber");
40386
- AtomBinder.refreshValue(this, "isCustom");
40387
- this._isChanging = false;
40388
- }
40389
- get valueAsNumber() {
40390
- var _a;
40391
- const v = this.propertyValue;
40392
- if (!v || v === "custom") {
40393
- return 0;
40394
- }
40395
- return (_a = this.values.findIndex(item => item.name === v)) !== null && _a !== void 0 ? _a : 0;
40396
- }
40397
- set valueAsNumber(v) {
40398
- var _a;
40399
- this.propertyValue = ((_a = this.values[v]) === null || _a === void 0 ? void 0 : _a.name) || this._old;
40400
- }
40401
- init() {
40402
- return __awaiter(this, void 0, void 0, function* () {
40403
- const parent = this.parent;
40404
- const pv = parent.selection.style(this.property.key);
40405
- this.values = this.property.values.filter(x => x.name !== "custom");
40406
- this.render(XNode.create("div", {
40407
- propertyValue: Bind.sourceTwoWays(pv, x => x.source.value),
40408
- custom: Bind.sourceTwoWays(pv, x => x.source.custom),
40409
- "data-element": "property-editor",
40410
- "data-display": "flex",
40411
- "data-justify-items": "stretch"
40412
- }, XNode.create("div", {
40413
- "data-layout": "row"
40414
- }, XNode.create("label", {
40415
- "data-font-size": "small",
40416
- text: Bind.oneWay(() => this.label)
40417
- }), XNode.create("input", {
40418
- type: "checkbox",
40419
- checked: Bind.twoWaysImmediate(() => this.isCustom)
40420
- })), XNode.create("div", null, XNode.create("input", {
40421
- "style-display": Bind.oneWay(() => !this.isCustom),
40422
- type: "range",
40423
- min: 0,
40424
- max: this.values.length - 2,
40425
- value: Bind.twoWays(() => this.valueAsNumber)
40426
- }), XNode.create("input", {
40427
- "style-display": Bind.oneWay(() => this.isCustom),
40428
- type: "text",
40429
- value: Bind.twoWaysImmediate(() => this.custom)
40430
- }))));
40431
- });
40432
- }
40433
- preCreate() {
40434
- this.runAfterInit(() => this.app.runAsync(() => this.init()));
40435
- }
40436
- });
40437
- __decorate([BindableProperty, __metadata("design:type", String)], SizeEditorControl.prototype, "label", void 0);
40438
- __decorate([BindableProperty, __metadata("design:type", Function)], SizeEditorControl.prototype, "property", void 0);
40439
- __decorate([BindableProperty, __metadata("design:type", String)], SizeEditorControl.prototype, "custom", void 0);
40343
+ SizeEditorControl = DropDownProperty;
40344
+ _export("default", SizeEditorControl);
40440
40345
  }
40441
40346
  };
40442
40347
  });
@@ -40666,43 +40571,41 @@ System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor"
40666
40571
  System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor", "../../styler/StylerSet", "../controls/SizeEditorControl"], function (_export, _context) {
40667
40572
  "use strict";
40668
40573
 
40669
- var XNode, DropDownProperty, ExpanderPropertyEditor, StylerSet, SizeEditorControl, BindSizeEditor, properties;
40574
+ var XNode, BindEditor, DropDownProperty, ExpanderPropertyEditor, StylerSet, SizeEditorControl, properties;
40670
40575
  function PositionGroupEditor() {
40671
40576
  return XNode.create(ExpanderPropertyEditor, {
40672
40577
  label: "Position"
40673
40578
  }, XNode.create(DropDownProperty, {
40674
40579
  label: "Position",
40675
40580
  property: properties.stylerPosition
40676
- }), XNode.create(SizeEditorControl, {
40581
+ }), XNode.create("section", {
40582
+ "style-display": BindEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.selection.currentStyle.position))
40583
+ }, XNode.create(SizeEditorControl, {
40677
40584
  label: "Left",
40678
- "style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
40679
40585
  property: properties.stylerLeft
40680
40586
  }), XNode.create(SizeEditorControl, {
40681
40587
  label: "Top",
40682
- "style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
40683
40588
  property: properties.stylerTop
40684
40589
  }), XNode.create(SizeEditorControl, {
40685
40590
  label: "Right",
40686
- "style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
40687
40591
  property: properties.stylerRight
40688
40592
  }), XNode.create(SizeEditorControl, {
40689
40593
  label: "Bottom",
40690
- "style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
40691
40594
  property: properties.stylerBottom
40692
- }));
40595
+ })));
40693
40596
  }
40694
40597
  _export("default", PositionGroupEditor);
40695
40598
  return {
40696
40599
  setters: [function (_webAtomsCoreDistCoreXNode) {
40697
40600
  XNode = _webAtomsCoreDistCoreXNode.default;
40698
40601
  }, function (_controlsPropertyEditor) {
40602
+ BindEditor = _controlsPropertyEditor.BindEditor;
40699
40603
  DropDownProperty = _controlsPropertyEditor.DropDownProperty;
40700
40604
  ExpanderPropertyEditor = _controlsPropertyEditor.ExpanderPropertyEditor;
40701
40605
  }, function (_stylerStylerSet) {
40702
40606
  StylerSet = _stylerStylerSet.StylerSet;
40703
40607
  }, function (_controlsSizeEditorControl) {
40704
40608
  SizeEditorControl = _controlsSizeEditorControl.default;
40705
- BindSizeEditor = _controlsSizeEditorControl.BindSizeEditor;
40706
40609
  }],
40707
40610
  execute: function () {
40708
40611
  ({